[Kst] kdeextragear-2/kst/kst
    George Staikos 
    staikos at kde.org
       
    Fri Jun  4 22:41:04 CEST 2004
    
    
  
CVS commit by staikos: 
don't crash
  M +3 -4      kstdoc.cpp   1.81
--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.80:1.81
@@ -467,5 +467,4 @@ bool KstDoc::saveDocument(const QString 
 void KstDoc::deleteContents() {
   KMdiIterator<KMdiChildView*>* pIterator;
-  KstViewWindow* pView;
 
   KST::vectorDefaults.sync();
@@ -479,9 +478,9 @@ void KstDoc::deleteContents() {
     if (pIterator) {
       while (pIterator->currentItem()) {
-        pView = dynamic_cast<KstViewWindow*>(pIterator->currentItem());
+        KMdiChildView *pView = pIterator->currentItem();
+        pIterator->next();
         if (pView) {
-          pView->close( );
+          KstApp::inst()->closeWindow(pView);
         }
-        pIterator->next();
       }
       KstApp::inst()->deleteIterator(pIterator);
    
    
More information about the Kst
mailing list