Skip to content

Commit 67c9a72

Browse files
committed
Fix crash with SQL Server driver
1 parent c9cfdfa commit 67c9a72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/mssql/qgsmssqlfeatureiterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void QgsMssqlFeatureIterator::BuildStatement( const QgsFeatureRequest& request )
8989

9090
bool filterAdded = false;
9191
// set spatial filter
92-
if ( request.filterType() == QgsFeatureRequest::FilterRect && mSource->isSpatial() )
92+
if ( request.filterType() == QgsFeatureRequest::FilterRect && mSource->isSpatial() && !request.filterRect().isEmpty() )
9393
{
9494
// polygons should be CCW for SqlGeography
9595
QString r;

0 commit comments

Comments
 (0)