From 53804d7e4db820048b9eba258ef605cd84c0a6e1 Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Sat, 3 Dec 2022 08:32:49 +0100 Subject: [PATCH] [CrashFix]Sketcher: prevent crash at FC closure when edit control panel is disabled, fixes #7931 Introduced by bf04c0e --- src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp index f8119a4625..54ba18009c 100644 --- a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp +++ b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp @@ -81,6 +81,10 @@ TaskDlgEditSketch::~TaskDlgEditSketch() std::vector::iterator it = std::find(Content.begin(), Content.end(), SolverAdvanced); if (it == Content.end()) Content.push_back(SolverAdvanced); + // same thing for edit control panel + it = std::find(Content.begin(), Content.end(), General); + if (it == Content.end()) + Content.push_back(General); } //==== calls from the TaskView ===============================================================