fix crash while editing shapes

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7769 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2007-12-11 22:46:14 +00:00
parent 55744d629c
commit 0ba25e4366

View File

@ -287,7 +287,8 @@ bool QgsOgrProvider::getNextFeature(QgsFeature& feature)
//precise test for intersection with search rectangle
//first make QgsRect from OGRPolygon
OGREnvelope env;
mSelectionRectangle->getEnvelope(&env);
if(mSelectionRectangle)
mSelectionRectangle->getEnvelope(&env);
if(env.IsInit()) //if envelope is invalid, skip the precise intersection test
{
selectionRect.set(env.MinX, env.MinY, env.MaxX, env.MaxY);