Skip to content

Commit

Permalink
added check if no gemetry is available
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Jun 12, 2017
1 parent fdd5a50 commit 008cc79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsvectorlayereditbuffer.cpp
Expand Up @@ -320,7 +320,8 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList &commitErrors )
{
for ( QgsFeature f : mAddedFeatures )
{
if ( f.geometry().wkbType() == provider->wkbType() )
if ( ( ! f.hasGeometry() ) ||
( f.geometry().wkbType() == provider->wkbType() ) )
continue;

std::unique_ptr<QgsGeometry> convertedGeom( provider->convertToProviderType( f.geometry() ) );
Expand Down

0 comments on commit 008cc79

Please sign in to comment.