Skip to content

Commit

Permalink
[virtual] Protect RTree filter in case of null geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Apr 3, 2020
1 parent e028132 commit e8ec44d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/providers/virtual/qgsvirtuallayersqlitemodule.cpp
Expand Up @@ -597,9 +597,12 @@ int vtableFilter( sqlite3_vtab_cursor *cursor, int idxNum, const char *idxStr, i
{
// rtree filter
const char *blob = reinterpret_cast< const char * >( sqlite3_value_blob( argv[0] ) );
int bytes = sqlite3_value_bytes( argv[0] );
QgsRectangle r( spatialiteBlobBbox( blob, bytes ) );
request.setFilterRect( r );
if ( blob )
{
int bytes = sqlite3_value_bytes( argv[0] );
QgsRectangle r( spatialiteBlobBbox( blob, bytes ) );
request.setFilterRect( r );
}
}
else if ( idxNum == 3 )
{
Expand Down

0 comments on commit e8ec44d

Please sign in to comment.