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
(cherry picked from commit e8ec44d)
  • Loading branch information
Hugo Mercier authored and nyalldawson committed Apr 6, 2020
1 parent b12810d commit deac6f5
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 deac6f5

Please sign in to comment.