aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/qsgbasicinternalimagenode.cpp')
-rw-r--r--src/quick/scenegraph/qsgbasicinternalimagenode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
index c434563c90..d8efda1ecc 100644
--- a/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
+++ b/src/quick/scenegraph/qsgbasicinternalimagenode.cpp
@@ -258,7 +258,7 @@ QSGGeometry *QSGBasicInternalImageNode::updateGeometry(const QRectF &targetRect,
xs[1].tx = innerSourceRect.left();
xs += 2;
}
- if (innerTargetRect.width() != 0) {
+ if (innerTargetRect.width() != 0 && hTiles > 0) {
xs[0].x = innerTargetRect.left();
xs[0].tx = innerSourceRect.x() + (subSourceRect.left() - floorLeft) * innerSourceRect.width();
++xs;
@@ -299,7 +299,7 @@ QSGGeometry *QSGBasicInternalImageNode::updateGeometry(const QRectF &targetRect,
ys[1].ty = innerSourceRect.top();
ys += 2;
}
- if (innerTargetRect.height() != 0) {
+ if (innerTargetRect.height() != 0 && vTiles > 0) {
ys[0].y = innerTargetRect.top();
ys[0].ty = innerSourceRect.y() + (subSourceRect.top() - floorTop) * innerSourceRect.height();
++ys;