Skip to content

Commit

Permalink
Bugfix: verify existence of scene pointer due to unpredictable order …
Browse files Browse the repository at this point in the history
…of events
  • Loading branch information
joern274 committed Oct 11, 2023
1 parent 2e53d94 commit 26b201f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/gui/src/graph_widget/graph_graphics_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ namespace hal
void GraphGraphicsView::dragLeaveEvent(QDragLeaveEvent* event)
{
Q_UNUSED(event)
static_cast<GraphicsScene*>(scene())->stopDragShadow();
if (scene()) static_cast<GraphicsScene*>(scene())->stopDragShadow();
}

void GraphGraphicsView::dragMoveEvent(QDragMoveEvent* event)
Expand Down Expand Up @@ -556,7 +556,7 @@ namespace hal
{
event->acceptProposedAction();
GraphicsScene* s = static_cast<GraphicsScene*>(scene());
s->stopDragShadow();
if (s) s->stopDragShadow();
if (mDropAllowed)
{
auto context = mGraphWidget->getContext();
Expand Down

0 comments on commit 26b201f

Please sign in to comment.