Fixed issue where active tool could be nullptr

This commit is contained in:
Jeremy Borgman
2021-03-03 12:46:54 -06:00
committed by borgmanJeremy
parent 01a3b809f3
commit e0333bb0ba

View File

@@ -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) {