Fix a crash when importing layers without geometry to mssql

This commit is contained in:
Nyall Dawson 2016-01-30 07:58:07 +11:00
parent 49e45675ee
commit 4a1bf6d34d

View File

@ -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 );
}
}