fixes #0003122: FC 0.17 crashes when a sketched located outside a body object

This commit is contained in:
wmayer
2017-07-16 16:56:06 +02:00
parent 3d33c309d4
commit 7cfc084e47

View File

@@ -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;