From e0333bb0ba6971763589557081ca60eead82f356 Mon Sep 17 00:00:00 2001 From: Jeremy Borgman Date: Wed, 3 Mar 2021 12:46:54 -0600 Subject: [PATCH] Fixed issue where active tool could be nullptr --- src/widgets/capture/capturewidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 48d8c0aa..1c9fbbaa 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -831,8 +831,10 @@ void CaptureWidget::setState(CaptureToolButton* b) } if (m_toolWidget) { m_toolWidget->deleteLater(); - if (m_activeTool->isValid()) { - pushToolToStack(); + if (m_activeTool != nullptr) { + if (m_activeTool->isValid()) { + pushToolToStack(); + } } } if (m_activeButton != b) {