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

List:       kde-commits
Subject:    koffice/lib/kofficecore
From:       David Faure <faure () kde ! org>
Date:       2002-12-12 18:36:59
[Download RAW message or body]

CVS commit by faure: 

Fix crash on exit after using "New View". The previous fix (1.277) was wrong.
Simon: how does this look?
CCMAIL: 51658-done@bugs.kde.org


  M +4 -6      koMainWindow.cc   1.279


--- koffice/lib/kofficecore/koMainWindow.cc  #1.278:1.279
@@ -308,5 +308,4 @@ KoMainWindow::~KoMainWindow()
     {
         //kdDebug(30003) << "Destructor. No more views, deleting old doc " << \
                d->m_rootDoc << endl;
-        d->m_manager->removePart( d->m_rootDoc ); // otherwise ~PartManager will try \
to access the deleted doc  delete d->m_rootDoc;
     }
@@ -334,5 +333,5 @@ void KoMainWindow::setRootDocument( KoDo
   {
     doc->setSelectable( false );
-    d->m_manager->addPart( doc, false );
+    //d->m_manager->addPart( doc, false ); // done by KoView::setPartManager
     d->m_rootViews.append( doc->createView( d->m_splitter ) );
     d->m_rootViews.current()->setPartManager( d->m_manager );
@@ -363,5 +362,4 @@ void KoMainWindow::setRootDocument( KoDo
   {
     //kdDebug(30003) << "No more views, deleting old doc " << oldRootDoc << endl;
-    d->m_manager->removePart( oldRootDoc ); // otherwise ~PartManager will try to \
access the deleted doc  delete oldRootDoc;
   }


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

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