[Bug 180288] crash during kontact startup

Nicolas Lécureuil nlecureuil at mandriva.com
Fri Dec 11 17:41:11 GMT 2009


https://bugs.kde.org/show_bug.cgi?id=180288


Nicolas Lécureuil <nlecureuil at mandriva.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nlecureuil at mandriva.com




--- Comment #7 from Nicolas Lécureuil <nlecureuil mandriva com>  2009-12-11 18:40:56 ---
i don't reproduce but i thins can still happen as mCalendar is used w/o being
tested.

is this patch ok to be commited ?Index:
kontact/plugins/specialdates/sdsummarywidget.cpp
===================================================================
--- kontact/plugins/specialdates/sdsummarywidget.cpp    (revision 1061413)
+++ kontact/plugins/specialdates/sdsummarywidget.cpp    (working copy)
 -681,14 +681,15 @@
 ResourceCalendar *SDSummaryWidget::usingBirthdayResource()
 {
   ResourceCalendar *resource = 0;
-
-  CalendarResourceManager *manager = mCalendar->resourceManager();
-  if ( !manager->isEmpty() ) {
-    CalendarResourceManager::Iterator it;
-    for ( it = manager->begin(); it != manager->end(); ++it ) {
-      if ( (*it)->type() == QLatin1String( "birthdays" ) ) {
-        resource = (*it);
-        break;
+  if ( mCalendar ) {
+    CalendarResourceManager *manager = mCalendar->resourceManager();
+    if ( !manager->isEmpty() ) {
+      CalendarResourceManager::Iterator it;
+      for ( it = manager->begin(); it != manager->end(); ++it ) {
+        if ( (*it)->type() == QLatin1String( "birthdays" ) ) {
+          resource = (*it);
+          break;
+        }
       }
     }
   }

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list