Commit 95f214a3 authored by Sebastian Sauer's avatar Sebastian Sauer

let's use a imho better (as in easier to read+understand) fix for the crash

svn path=/trunk/koffice/; revision=658791
parent 2c800e8d
......@@ -641,7 +641,8 @@ bool KoMainWindow::openDocumentInternal( const KUrl & url, KoDocument *newdoc )
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 @@ void KoMainWindow::slotLoadCanceled( const QString & errMsg )
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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment