Skip to content
Permalink
Browse files
Fix crash when removing layers from running transactions
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 dca0dc1dd572f4b7d7aba1e4f2841307ecff6189
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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 )

0 comments on commit dca0dc1

Please sign in to comment.