[QGIS Commit] r13889 - trunk/qgis/src/core/raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Jul 5 08:44:25 EDT 2010
Author: mhugent
Date: 2010-07-05 12:44:25 +0000 (Mon, 05 Jul 2010)
New Revision: 13889
Modified:
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
Fix crash if raster width is below 1 pixels (ticket #2846)
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-07-05 07:19:41 UTC (rev 13888)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-07-05 12:44:25 UTC (rev 13889)
@@ -5701,7 +5701,7 @@
ySize = fabs((( rasterYSize ) / mMapToPixel->mapUnitsPerPixel() * mGeoTransform[5] ) ) + 0.5;
}
}
- if ( ySize == 0 )
+ if ( ySize < 1 || xSize < 1 )
{
return false;
}
More information about the QGIS-commit
mailing list