aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-12-01 09:42:21 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-01 09:57:35 +0100
commitf8aa59b21f5231532d1e4d0d5d4d0b4f123ab732 (patch)
treeade80b5f7e2ae46a98c2e0093c0dc498ba599a02 /src
parentb99c9490c398fb4d285d5f28edd553445b76d79f (diff)
Fixed crash when updating Image.source and BorderImage.source
We need to update the texture pointer in the scene graph node when the imagedata has changed. Change-Id: I0246626d3ebb66db9c5cf85fb1c2034ed233984f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/items/qquickborderimage.cpp3
-rw-r--r--src/declarative/items/qquickimage.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/items/qquickborderimage.cpp b/src/declarative/items/qquickborderimage.cpp
index fac7543fce..5f30c40626 100644
--- a/src/declarative/items/qquickborderimage.cpp
+++ b/src/declarative/items/qquickborderimage.cpp
@@ -592,6 +592,9 @@ void QQuickBorderImage::pixmapChange()
Q_D(QQuickBorderImage);
d->pixmapChanged = true;
+
+ // When the pixmap changes, such as being deleted, we need to update the textures
+ update();
}
QT_END_NAMESPACE
diff --git a/src/declarative/items/qquickimage.cpp b/src/declarative/items/qquickimage.cpp
index 6d2e1b3187..2f924fa313 100644
--- a/src/declarative/items/qquickimage.cpp
+++ b/src/declarative/items/qquickimage.cpp
@@ -703,9 +703,8 @@ void QQuickImage::pixmapChange()
updatePaintedGeometry();
d->pixmapChanged = true;
- // Make sure we update the texture provider when the image has changed.
- if (d->provider)
- update();
+ // When the pixmap changes, such as being deleted, we need to update the textures
+ update();
}
QQuickImage::VAlignment QQuickImage::verticalAlignment() const