Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return minimal QgsRectangle as boundingBox if geometry not available,…
… since QgsRectangle(0,0,0,0) may be a valid bounding box for some geometries
  • Loading branch information
nyalldawson committed Aug 4, 2013
1 parent e76fc95 commit f6d2d8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsgeometry.cpp
Expand Up @@ -3607,7 +3607,10 @@ QgsRectangle QgsGeometry::boundingBox()
if ( !mGeometry )
{
QgsDebugMsg( "WKB geometry not available!" );
return QgsRectangle( 0, 0, 0, 0 );
// Return minimal QgsRectangle
QgsRectangle invalidRect;
invalidRect.setMinimal();
return invalidRect;
}

// consider endian when fetching feature type
Expand Down

0 comments on commit f6d2d8a

Please sign in to comment.