Skip to content

Commit a72005e

Browse files
author
mhugent
committedNov 10, 2006

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/gui/qgsmaptoolzoom.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,20 @@ void QgsMapToolZoom::canvasReleaseEvent(QMouseEvent * e)
9191
double sf;
9292
if (mZoomRect.width() > mZoomRect.height())
9393
{
94+
if(r.width() == 0)//prevent nan map extent
95+
{
96+
return;
97+
}
9498
sf = extent.width() / r.width();
9599
}
96100
else
97101
{
102+
if(r.height() == 0)//prevent nan map extent
103+
{
104+
return;
105+
}
98106
sf = extent.height() / r.height();
99107
}
100-
101108
r.expand(sf);
102109

103110
#ifdef QGISDEBUG

0 commit comments

Comments
 (0)
Please sign in to comment.