Skip to content

Commit

Permalink
[GRASS] do not insert records if table does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 7, 2015
1 parent e223bcc commit 9b54ed4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/providers/grass/qgsgrassprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1332,10 +1332,13 @@ void QgsGrassProvider::onFeatureAdded( QgsFeatureId fid )
}
else
{
mLayer->insertAttributes( newCat, feature, error );
if ( !error.isEmpty() )
if ( mLayer->hasTable() )
{
QgsGrass::warning( error );
mLayer->insertAttributes( newCat, feature, error );
if ( !error.isEmpty() )
{
QgsGrass::warning( error );
}
}
}
}
Expand Down

0 comments on commit 9b54ed4

Please sign in to comment.