Update SGNode after pixmap is invalidated
authorAlan Alpert <416365416c@gmail.com>
Sat, 17 Nov 2012 06:32:03 +0000 (22:32 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 30 Nov 2012 17:46:35 +0000 (18:46 +0100)
If the QDeclarativePixmap on a previously valid Image is cleared, and the
scenegraph updates before the networked pixmap request returns, the
scenegraph can crash when trying to paint a now invalid texture.

Task-number: QTBUG-27795
Change-Id: I83436f846a3e965b324ff6ebf057708fe8c3b82a
Reviewed-by: Alan Alpert <aalpert@rim.com>
src/quick/items/qquickimagebase.cpp

index 2168b93..5808566 100644 (file)
@@ -230,7 +230,7 @@ void QQuickImageBase::load()
 
             d->pix.connectFinished(this, thisRequestFinished);
             d->pix.connectDownloadProgress(this, thisRequestProgress);
-
+            update(); //pixmap may have invalidated texture, updatePaintNode needs to be called before the next repaint
         } else {
             requestFinished();
         }