Skip to content

Commit 0055927

Browse files
author
mhugent
committed
Fix crash if raster width is below 1 pixels (ticket #2846)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13889 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 1efc10d commit 0055927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/raster/qgsrasterlayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5701,7 +5701,7 @@ bool QgsRasterImageBuffer::createNextPartImage()
57015701
ySize = fabs((( rasterYSize ) / mMapToPixel->mapUnitsPerPixel() * mGeoTransform[5] ) ) + 0.5;
57025702
}
57035703
}
5704-
if ( ySize == 0 )
5704+
if ( ySize < 1 || xSize < 1 )
57055705
{
57065706
return false;
57075707
}

0 commit comments

Comments
 (0)