Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Coverity divide by 0 error
  • Loading branch information
nyalldawson committed Apr 17, 2017
1 parent 952bc02 commit e4d6bbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -1219,7 +1219,7 @@ namespace QgsWms
{
mapExtent.invert();
}
if ( !mapExtent.isEmpty() && height > 0 )
if ( !mapExtent.isEmpty() && height > 0 && width > 0 )
{
double mapWidthHeightRatio = mapExtent.width() / mapExtent.height();
double imageWidthHeightRatio = ( double )width / ( double )height;
Expand Down

0 comments on commit e4d6bbf

Please sign in to comment.