From 26b201f4bb5d87ad1b8a124416ac4070001d13eb Mon Sep 17 00:00:00 2001 From: joern274 Date: Wed, 11 Oct 2023 17:14:06 +0200 Subject: [PATCH] Bugfix: verify existence of scene pointer due to unpredictable order of events --- plugins/gui/src/graph_widget/graph_graphics_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gui/src/graph_widget/graph_graphics_view.cpp b/plugins/gui/src/graph_widget/graph_graphics_view.cpp index 8bcba14946e..f366d96afea 100644 --- a/plugins/gui/src/graph_widget/graph_graphics_view.cpp +++ b/plugins/gui/src/graph_widget/graph_graphics_view.cpp @@ -500,7 +500,7 @@ namespace hal void GraphGraphicsView::dragLeaveEvent(QDragLeaveEvent* event) { Q_UNUSED(event) - static_cast(scene())->stopDragShadow(); + if (scene()) static_cast(scene())->stopDragShadow(); } void GraphGraphicsView::dragMoveEvent(QDragMoveEvent* event) @@ -556,7 +556,7 @@ namespace hal { event->acceptProposedAction(); GraphicsScene* s = static_cast(scene()); - s->stopDragShadow(); + if (s) s->stopDragShadow(); if (mDropAllowed) { auto context = mGraphWidget->getContext();