Skip to content

Commit

Permalink
Fix crash when removing layers from running transactions
Browse files Browse the repository at this point in the history
qobject_cast no longer works when the QObject::destryed signal is being emitted
  • Loading branch information
m-kuhn committed Nov 9, 2017
1 parent 78622b4 commit dca0dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgstransaction.cpp
Expand Up @@ -171,7 +171,7 @@ bool QgsTransaction::supportsTransaction( const QgsVectorLayer *layer )

void QgsTransaction::onLayerDeleted()
{
mLayers.remove( qobject_cast<QgsVectorLayer *>( sender() ) );
mLayers.remove( static_cast<QgsVectorLayer *>( sender() ) );
}

void QgsTransaction::setLayerTransactionIds( QgsTransaction *transaction )
Expand Down

0 comments on commit dca0dc1

Please sign in to comment.