From 998a780676a765ff96802f75ee49fbf964ad6595 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 2 Dec 2024 21:44:18 +0100 Subject: [PATCH] Fixing bug #1941 (crash with navigator open) --- src/laybasic/laybasic/layLayoutViewBase.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/laybasic/laybasic/layLayoutViewBase.cc b/src/laybasic/laybasic/layLayoutViewBase.cc index 19e6ab7b0..9731df590 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.cc +++ b/src/laybasic/laybasic/layLayoutViewBase.cc @@ -4084,7 +4084,9 @@ LayoutViewBase::cancel_edits () // the move service takes a special role here as it manages the // transaction for the collective move operation. - mp_move_service->cancel (); + if (mp_move_service) { + mp_move_service->cancel (); + } // cancel all drag and pending edit operations such as move operations. mp_canvas->drag_cancel (); @@ -4099,7 +4101,9 @@ LayoutViewBase::finish_edits () { // the move service takes a special role here as it manages the // transaction for the collective move operation. - mp_move_service->finish (); + if (mp_move_service) { + mp_move_service->finish (); + } // cancel all drag operations mp_canvas->drag_cancel (); @@ -5460,7 +5464,7 @@ LayoutViewBase::paste_interactive (bool transient_mode) // operations. trans->close (); - if (mp_move_service->begin_move (trans.release (), transient_mode)) { + if (mp_move_service && mp_move_service->begin_move (trans.release (), transient_mode)) { switch_mode (-1); // move mode } }