SVN commit 658791 by sebsauer: let's use a imho better (as in easier to read+understand) fix for the crash M +2 -4 KoMainWindow.cpp --- trunk/koffice/libs/kofficecore/KoMainWindow.cpp #658790:658791 @@ -641,7 +641,8 @@ bool openRet = (!isImporting ()) ? newdoc->openURL(url) : newdoc->import(url); if(!openRet) { - //newdoc->removeShell(this); delete newdoc; // already done by slotLoadCanceled() + newdoc->removeShell(this); + delete newdoc; return false; } updateReloadFileAction(newdoc); @@ -696,9 +697,6 @@ disconnect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int))); disconnect(newdoc, SIGNAL(completed()), this, SLOT(slotLoadCompleted())); disconnect(newdoc, SIGNAL(canceled( const QString & )), this, SLOT(slotLoadCanceled( const QString & ))); - - newdoc->removeShell(this); - delete newdoc; } void KoMainWindow::slotSaveCanceled( const QString &errMsg )