Skip to content
Permalink
Browse files

Do not crash if there is no savepoint

  • Loading branch information
m-kuhn committed Nov 3, 2017
1 parent 8bfa3eb commit 479970baf092ed7ce7b135e194862c5c7cc9ff4e
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgsvectorlayerundopassthroughcommand.cpp
@@ -31,7 +31,8 @@

QgsVectorLayerUndoPassthroughCommand::QgsVectorLayerUndoPassthroughCommand( QgsVectorLayerEditBuffer *buffer, const QString &text, bool autocreate )
: QgsVectorLayerUndoCommand( buffer )
, mSavePointId( mBuffer->L->isEditCommandActive() || !autocreate
, mSavePointId( mBuffer->L->isEditCommandActive() && !mBuffer->L->dataProvider()->transaction()->savePoints().isEmpty()
|| !autocreate
? mBuffer->L->dataProvider()->transaction()->savePoints().last()
: mBuffer->L->dataProvider()->transaction()->createSavepoint( mError ) )
, mHasError( !mError.isEmpty() )

0 comments on commit 479970b

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