From f1f147a8268fc115f66d4e920e966aab4ba73603 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 20 May 2021 22:15:46 +0200 Subject: [PATCH] On-Preview Editing Widgets: Crashes, #6244 --- rtgui/cropwindow.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index a3e00c80a..5a1debb23 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -705,15 +705,15 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) state = SNormal; needRedraw = true; } else if (state == SEditDrag1 || state == SEditDrag2 || state == SEditDrag3) { - if (state == SEditDrag1) { - needRedraw = editSubscriber->button1Released(); - } else if (state == SEditDrag2) { - needRedraw = editSubscriber->button2Released(); - } else if (state == SEditDrag3) { - needRedraw = editSubscriber->button3Released(); - } - if (editSubscriber) { + if (state == SEditDrag1) { + needRedraw = editSubscriber->button1Released(); + } else if (state == SEditDrag2) { + needRedraw = editSubscriber->button2Released(); + } else if (state == SEditDrag3) { + needRedraw = editSubscriber->button3Released(); + } + rtengine::Crop* crop = static_cast(cropHandler.getCrop()); Coord imgPos; action_x = x;