Skip to content

Commit

Permalink
Fix a crash when importing layers without geometry to mssql
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 29, 2016
1 parent 49e4567 commit 4a1bf6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/mssql/qgsmssqlprovider.cpp
Expand Up @@ -925,7 +925,9 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList & flist )
}
else
{
QString wkt = geom->exportToWkt();
QString wkt;
if ( geom && !geom->isEmpty() )
wkt = geom->exportToWkt();
query.addBindValue( wkt );
}
}
Expand Down

0 comments on commit 4a1bf6d

Please sign in to comment.