[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/koffice/1.5/koffice/lib/kofficecore
From:       David Faure <faure () kde ! org>
Date:       2006-04-10 23:03:25
Message-ID: 1144710205.325780.32331.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 528415 by dfaure:

if newdoc is NULL there, we were in trouble already, move up the check.


 M  +3 -1      KoMainWindow.cpp  


--- branches/koffice/1.5/koffice/lib/kofficecore/KoMainWindow.cpp #528414:528415
@@ -582,6 +582,8 @@
 
     if ( !newdoc )
         newdoc = createDoc();
+    if ( !newdoc )
+        return false;
 
     d->m_firstTime=true;
     connect(newdoc, SIGNAL(sigProgress(int)), this, SLOT(slotProgress(int)));
@@ -589,7 +591,7 @@
     connect(newdoc, SIGNAL(canceled( const QString & )), this, \
SLOT(slotLoadCanceled( const QString & )));  newdoc->addShell( this ); // used by \
                openURL
     bool openRet = (!isImporting ()) ? newdoc->openURL(url) : newdoc->import(url);
-    if(!newdoc || !openRet)
+    if(!openRet)
     {
         newdoc->removeShell(this);
         delete newdoc;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic