[evolution-ews] Bug #664174 - Crash in add_item_to_cache()
- From: Milan Crha <mcrha src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [evolution-ews] Bug #664174 - Crash in add_item_to_cache()
 
- Date: Fri, 22 Nov 2013 11:16:09 +0000 (UTC)
 
commit 0d4634b346ffa622b2dc2ae7b0ba665698428739
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 22 12:15:43 2013 +0100
    Bug #664174 - Crash in add_item_to_cache()
 src/calendar/e-cal-backend-ews.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index d21f410..39b53eb 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3525,6 +3525,8 @@ add_item_to_cache (ECalBackendEws *cbews,
                }
 
                if (item_type == E_EWS_ITEM_TYPE_TASK) {
+                       const gchar *percent_complete;
+
                        /*start date*/
                        has_this_date = FALSE;
                        e_ews_item_task_has_start_date (item, &has_this_date);
@@ -3551,7 +3553,8 @@ add_item_to_cache (ECalBackendEws *cbews,
                        }
 
                        /*precent complete*/
-                       icalprop  = icalproperty_new_percentcomplete (atoi (e_ews_item_get_percent_complete 
(item)));
+                       percent_complete = e_ews_item_get_percent_complete (item);
+                       icalprop  = icalproperty_new_percentcomplete (atoi (percent_complete ? 
percent_complete : "0"));
                        icalcomponent_add_property (icalcomp, icalprop);
 
                        /*due date*/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]