aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-06-12 16:35:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-13 12:44:16 +0200
commit8fa9263cb14fd5f3aa237b95014dbae2647b77e3 (patch)
tree807140e4b477c7ac93a4381f68091630bd336dcd /src
parente500396d12c9f0155797ff53e347bf8ba9f69c7a (diff)
Don't show a negative size canvas.
This is in line with how Rectangle and Image elements also behave. Change-Id: I82cd6ecc6d233645bb3fd968f0f81218188a8991 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 3b1b6d5086..1b33680361 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -683,7 +683,7 @@ QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData
{
Q_D(QQuickCanvasItem);
- if (!d->context) {
+ if (!d->context || d->canvasWindow.size().isEmpty()) {
delete oldNode;
return 0;
}