diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-19 05:47:56 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-19 05:47:56 (GMT) |
commit | 19e4d8f19e90841689dbc5dd5d13ad730c1f936d (patch) | |
tree | 2c573eea78c7ccc26d7c27e36c5323c3745c28ef /src/declarative/util/qmlpixmapcache.cpp | |
parent | 7175c49346a147558d65c5b10565423a6d8ea9ec (diff) | |
download | Qt-19e4d8f19e90841689dbc5dd5d13ad730c1f936d.zip Qt-19e4d8f19e90841689dbc5dd5d13ad730c1f936d.tar.gz Qt-19e4d8f19e90841689dbc5dd5d13ad730c1f936d.tar.bz2 |
Delete the QmlImageRequestHandler in the correct thread.
Diffstat (limited to 'src/declarative/util/qmlpixmapcache.cpp')
-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; } //=========================================================================== |