From 5caae5f430237a73cd17e283d45b3ac9ab005feb Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Sun, 27 Jan 2019 11:35:43 +0100 Subject: [PATCH] Fix chrash when clicking link to allow internetaccess, and not having a open document --- src/Mod/Web/Gui/BrowserView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Web/Gui/BrowserView.cpp b/src/Mod/Web/Gui/BrowserView.cpp index b380aaa384..307db2ecc6 100644 --- a/src/Mod/Web/Gui/BrowserView.cpp +++ b/src/Mod/Web/Gui/BrowserView.cpp @@ -329,7 +329,8 @@ void BrowserView::onLinkClicked (const QUrl & url) QMessageBox::critical(this, tr("Error"), QString::fromUtf8(e.what())); } - if(this->getAppDocument()->testStatus(App::Document::PartialRestore)) + App::Document *doc = BaseView::getAppDocument(); + if(doc && doc->testStatus(App::Document::PartialRestore)) QMessageBox::critical(this, tr("Error"), tr("There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved.")); } }