From 4ea580a339af1949b6892689098e5cc2f4d108ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 1 Oct 2013 15:35:16 +0200 Subject: 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 --- src/quick/scenegraph/qsgcontext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/quick/scenegraph/qsgcontext.cpp') 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; + } } -- cgit v1.2.3