diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 017575459f..d6fe9e08e3 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -307,13 +307,11 @@ void PropertyEditor::onItemActivated ( const QModelIndex & index ) void PropertyEditor::recomputeDocument(App::Document* doc) { try { - if (App::Document* doc = App::GetApplication().getActiveDocument()) { - if (!doc->isTransactionEmpty()) { - // Between opening and committing a transaction a recompute - // could already have been done - if (doc->isTouched()) - doc->recompute(); - } + if (doc && !doc->isTransactionEmpty()) { + // Between opening and committing a transaction a recompute + // could already have been done + if (doc->isTouched()) + doc->recompute(); } } // do not re-throw