Skip to content

Commit e4d6bbf

Browse files
committedApr 17, 2017
Fix Coverity divide by 0 error
1 parent 952bc02 commit e4d6bbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/server/services/wms/qgswmsrenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ namespace QgsWms
12191219
{
12201220
mapExtent.invert();
12211221
}
1222-
if ( !mapExtent.isEmpty() && height > 0 )
1222+
if ( !mapExtent.isEmpty() && height > 0 && width > 0 )
12231223
{
12241224
double mapWidthHeightRatio = mapExtent.width() / mapExtent.height();
12251225
double imageWidthHeightRatio = ( double )width / ( double )height;

0 commit comments

Comments
 (0)
Please sign in to comment.