Fix crash when invalidating QSGContext.
authorYoann Lopes <yoann.lopes@digia.com>
Tue, 5 Nov 2013 14:17:03 +0000 (15:17 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 7 Nov 2013 13:22:39 +0000 (14:22 +0100)
A pointer list was not cleared when invalidating the context,
potentially holding dangling pointers after that.

Change-Id: I0618c54ffa67b31b115901e8be3a6d3cd16dc844
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/quick/scenegraph/qsgcontext.cpp

index 4ccbaca..1f219e7 100644 (file)
@@ -483,6 +483,7 @@ void QSGRenderContext::invalidate()
          end = m_fontEnginesToClean.constEnd(); it != end; ++it) {
         (*it)->clearGlyphCache(m_gl);
     }
+    m_fontEnginesToClean.clear();
 
     delete m_depthStencilManager;
     m_depthStencilManager = 0;