diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qmlpixmapcache.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/declarative/util/qmlpixmapcache.cpp b/src/declarative/util/qmlpixmapcache.cpp index 21fce5e..56903ce 100644 --- a/src/declarative/util/qmlpixmapcache.cpp +++ b/src/declarative/util/qmlpixmapcache.cpp @@ -267,12 +267,12 @@ QmlImageReader::QmlImageReader(QmlEngine *eng) QmlImageReader::~QmlImageReader() { - quit(); - wait(); readerMutex.lock(); readers.remove(engine); readerMutex.unlock(); - delete handler; + + quit(); + wait(); } QmlImageReader *QmlImageReader::instance(QmlEngine *engine) @@ -335,6 +335,9 @@ void QmlImageReader::run() handler = new QmlImageRequestHandler(this, engine); exec(); + + delete handler; + handler = 0; } //=========================================================================== |