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 with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgstransaction.cpp
@@ -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.
You can’t perform that action at this time.