diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index d89bef17e9..8541f23ab2 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -859,7 +859,10 @@ void prepareProfileBased(Gui::Command* cmd, const std::string& which, auto* pcActiveBody = PartDesignGui::getBody(false); if (pcActiveBody && !bNoSketchWasSelected && ext) { - auto* pcActivePart = PartDesignGui::getPartFor(pcActiveBody, false); + auto* pcActivePart = PartDesignGui::getPartFor(pcActiveBody, true); + // getPartFor() already has reported an error + if (!pcActivePart) + return; QDialog* dia = new QDialog; Ui_Dialog dlg;