Gui: fix crash on Document resetEdit

This commit is contained in:
Zheng, Lei
2020-02-12 14:45:13 +08:00
committed by wwmayer
parent 644c277fbb
commit 6556276c5a
2 changed files with 8 additions and 1 deletions

View File

@@ -971,6 +971,8 @@ Gui::MDIView* Application::editViewOfNode(SoNode *node) const
}
void Application::setEditDocument(Gui::Document *doc) {
if(doc == d->editDocument)
return;
if(!doc)
d->editDocument = 0;
for(auto &v : d->documents)