PDA

View Full Version : Heap Corruption when calling availablePrinters



andyp
20th November 2009, 16:15
On Win32, why do I always get a "trying to free an invalid heap pointer" crash when the following goes out of scope:
{
QList<QPrinterInfo> list = QPrinterInfo::availablePrinters();
// ... some more code (or no code at all)
}
every time !!!
The crash happens in the C++ destructor of QList <QPrinterInfo>.
It happens irrespective of current thread (GUI or otherwise).