Skip to content
Permalink
Browse files
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 f6d2d8a5765b2ec4299ae347c954149a942620b0
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/qgsgeometry.cpp
@@ -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

0 comments on commit f6d2d8a

Please sign in to comment.