aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-01 15:35:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-02 16:07:33 +0200
commit4ea580a339af1949b6892689098e5cc2f4d108ca (patch)
treeda06f2cf043baac00696ec91e4521179b3cf5734 /src/quick/scenegraph/qsgcontext.cpp
parent1fe4d2533fee2cad4840fae2574c45d2fad2a441 (diff)
Don't delete scene-graph atlas manager if it hasn't been created yet
QSGContext::invalidate() is called from the QSGContext destructor, but the atlas manager is only created if QSGContext::initialize() is called, which may not always happen. The result was a bunch of "QCoreApplication::postEvent: Unexpected null receiver" messages during testing. Change-Id: I11a294d48c06d687a9f82cf1ce825063cda8ecf6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 8dc8cdc37d..f1c13a9a5a 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -234,8 +234,10 @@ void QSGContext::invalidate()
QSGAtlasTexture::Texture, but this seemed simpler.
*/
- d->atlasManager->deleteLater();
- d->atlasManager = 0;
+ if (d->atlasManager) {
+ d->atlasManager->deleteLater();
+ d->atlasManager = 0;
+ }
}