Fixed segmentation fault when setting shadowBlur in Canvas element.
authorSamuel Rødal <samuel.rodal@digia.com>
Fri, 26 Apr 2013 10:40:18 +0000 (12:40 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 26 Apr 2013 10:57:03 +0000 (12:57 +0200)
Task-number: QTBUG-30882
Change-Id: I6c941394527bac62c0d2792acf5cf223279babc7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/quick/items/context2d/qquickcontext2d.cpp

index 2859388..b366775 100644 (file)
@@ -282,7 +282,7 @@ QImage qt_image_convolute_filter(const QImage& src, const QVector<qreal>& weight
              for (int cx=0; cx<sides; cx++) {
                int scy = sy + cy - half;
                int scx = sx + cx - half;
-               if (scy >= 0 && scy < w && scx >= 0 && scx < h) {
+               if (scy >= 0 && scy < h && scx >= 0 && scx < w) {
                   const QRgb *sr = (const QRgb*)(src.constScanLine(scy));
                   const unsigned char* sRgb = ((const unsigned char*)&sr[scx]);
                   qreal wt = radius ? weights[0] : weights[cy*sides+cx];