Skip to content

Commit dca0dc1

Browse files
committed
Fix crash when removing layers from running transactions
qobject_cast no longer works when the QObject::destryed signal is being emitted
1 parent 78622b4 commit dca0dc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgstransaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ bool QgsTransaction::supportsTransaction( const QgsVectorLayer *layer )
171171

172172
void QgsTransaction::onLayerDeleted()
173173
{
174-
mLayers.remove( qobject_cast<QgsVectorLayer *>( sender() ) );
174+
mLayers.remove( static_cast<QgsVectorLayer *>( sender() ) );
175175
}
176176

177177
void QgsTransaction::setLayerTransactionIds( QgsTransaction *transaction )

0 commit comments

Comments
 (0)