Skip to content
Permalink
Browse files

[spatialite] Don't crash with NULL geometries (Fix #8739)

  • Loading branch information
m-kuhn committed Nov 14, 2013
1 parent aa90589 commit 9259e27c415b651ba49730adc098b798dc531908
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/analysis/openstreetmap/qgsosmdatabase.cpp
@@ -489,7 +489,10 @@ void QgsOSMDatabase::exportSpatiaLiteWays( bool closed, const QString& tableName
sqlite3_bind_null( stmtInsert, ++col );
}

sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), ( int ) geom->wkbSize(), SQLITE_STATIC );
if ( geom )
sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), ( int ) geom->wkbSize(), SQLITE_STATIC );
else
sqlite3_bind_null( stmtInsert, ++col );

int insertRes = sqlite3_step( stmtInsert );
if ( insertRes != SQLITE_DONE )

1 comment on commit 9259e27

@m-kuhn

This comment has been minimized.

Copy link
Member Author

@m-kuhn m-kuhn commented on 9259e27 Nov 15, 2013

Type: Fixes 8793 instead

Please sign in to comment.
You can’t perform that action at this time.