Skip to content

Commit 279adc7

Browse files
fix segfault from double right click (flameshot-org#4414)
* fix segfault from double right click * clang format
1 parent e9a8aed commit 279adc7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/widgets/capture/capturewidget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,9 @@ void CaptureWidget::mouseDoubleClickEvent(QMouseEvent* event)
918918
drawToolsData();
919919
updateLayersPanel();
920920
handleToolSignal(CaptureTool::REQ_ADD_CHILD_WIDGET);
921-
m_panel->setToolWidget(m_activeTool->configurationWidget());
921+
if (!m_activeTool.isNull()) {
922+
m_panel->setToolWidget(m_activeTool->configurationWidget());
923+
}
922924
}
923925
} else if (m_selection->geometry().contains(event->pos())) {
924926
if ((event->button() == Qt::LeftButton) &&

0 commit comments

Comments
 (0)