Git commit f747fc4700c07b108246882a4bb778a189386103 by Dr. Robert Marmorstein. Committed on 01/08/2011 at 18:15. Pushed by robertm into branch 'master'. Make sure pDoc isn't null before dereferencing. The parent document shouldn't ever be null, but why not be careful? (We were checking for this anyway, just in the wrong place.) M +4 -1 libs/main/KoMainWindow.cpp http://commits.kde.org/koffice/f747fc4700c07b108246882a4bb778a189386103 diff --git a/libs/main/KoMainWindow.cpp b/libs/main/KoMainWindow.cpp index 0dc0275..21b56c1 100644 --- a/libs/main/KoMainWindow.cpp +++ b/libs/main/KoMainWindow.cpp @@ -1751,8 +1751,11 @@ void KoMainWindow::slotReloadFile() if (!bOk) return; + if (!pDoc) + return; + KUrl url = pDoc->url(); - if (pDoc && !pDoc->isEmpty()) { + if (!pDoc->isEmpty()) { setRootDocument(0); // don't delete this shell when deleting the document if(d->rootDoc) d->rootDoc->clearUndoHistory();