Skip to content

Commit

Permalink
Prevent division by 0
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12764 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 14, 2010
1 parent ebee6cf commit db2cdc7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/symbology-ng/qgssymbollayerv2utils.cpp
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit db2cdc7

Please sign in to comment.