Fix wrong assert in QSGRenderLoop::setInstance
authorMarco Bubke <marco.bubke@digia.com>
Wed, 19 Feb 2014 13:54:24 +0000 (14:54 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 25 Feb 2014 12:56:41 +0000 (13:56 +0100)
The assert before test not if the scoped pointer is null but the pointer
which was holding the scoping pointer.

Task-number: QTBUG-36932
Change-Id: I7a5e51752446556c1796bb677fe69cbceffdd3e0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
src/quick/scenegraph/qsgrenderloop.cpp

index 08ab380..499abab 100644 (file)
@@ -204,7 +204,7 @@ QSGRenderLoop *QSGRenderLoop::instance()
 
 void QSGRenderLoop::setInstance(QSGRenderLoop *instance)
 {
-    Q_ASSERT(!s_renderLoopInstance);
+    Q_ASSERT(s_renderLoopInstance->isNull());
     s_renderLoopInstance->reset(instance);
 }