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

List:       kde-commits
Subject:    KDE/kdepim/korganizer
From:       Allen Winter <winter () kde ! org>
Date:       2007-11-30 16:08:14
Message-ID: 1196438894.076489.28166.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 743312 by winterz:

potential crash guard


 M  +5 -3      kotodoview.cpp  


--- trunk/KDE/kdepim/korganizer/kotodoview.cpp #743311:743312
@@ -783,10 +783,12 @@
     mDocPrefs->writeBoolEntry( listView->objectName() + " pos",
                            listView->contentsY() );
 
-    for ( Q3ListViewItemIterator it( listView ); it.current(); ++it )
-      if ( KOTodoViewItem *todoItem
-          = dynamic_cast<KOTodoViewItem *>( it.current() ) )
+    for ( Q3ListViewItemIterator it( listView ); it.current(); ++it ) {
+      KOTodoViewItem *todoItem = dynamic_cast<KOTodoViewItem *>( it.current() );
+      if ( todoItem && todoItem->todo() ) {
         mDocPrefs->writeNumEntry( todoItem->todo()->uid(), todoItem->isOpen() );
+      }
+    }
   } else
     kError( 5850 ) <<" mDocPrefs doesn't exist";
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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