From b9f74e7467f31b63bd0ff2ae9d66bcd61a8b8b6f Mon Sep 17 00:00:00 2001
From: Marco Bubke <marco.bubke@digia.com>
Date: Wed, 19 Feb 2014 14:54:24 +0100
Subject: [PATCH] Fix wrong assert in QSGRenderLoop::setInstance

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 08ab3809b3..499abab76b 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -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);
 }
 
-- 
GitLab