Skip to content

Commit

Permalink
Fix crash if raster width is below 1 pixels (ticket #2846)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13889 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 5, 2010
1 parent ce4d23f commit 6e06848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -5701,7 +5701,7 @@ bool QgsRasterImageBuffer::createNextPartImage()
ySize = fabs((( rasterYSize ) / mMapToPixel->mapUnitsPerPixel() * mGeoTransform[5] ) ) + 0.5;
}
}
if ( ySize == 0 )
if ( ySize < 1 || xSize < 1 )
{
return false;
}
Expand Down

0 comments on commit 6e06848

Please sign in to comment.