Skip to content
Permalink
Browse files

Prevent division by 0

git-svn-id: http://svn.osgeo.org/qgis/trunk@12764 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 14, 2010
1 parent 03c6340 commit d2c979fb7ab3b9d6cfe29310854e449b0955cacb
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/core/symbology-ng/qgssymbollayerv2utils.cpp
@@ -657,7 +657,15 @@ double QgsSymbolLayerV2Utils::pixelSizeScaleFactor( QgsRenderContext& c, QgsSymb
}
else //QgsSymbol::MapUnit
{
return c.rasterScaleFactor() / c.mapToPixel().mapUnitsPerPixel();
double mup = c.mapToPixel().mapUnitsPerPixel();
if ( mup > 0 )
{
return c.rasterScaleFactor() / c.mapToPixel().mapUnitsPerPixel();
}
else
{
return 1.0;
}
}
}

0 comments on commit d2c979f

Please sign in to comment.
You can’t perform that action at this time.