diff options
author | karl-qdh <karl@qdh.org.uk> | 2011-02-16 15:38:52 +0000 |
---|---|---|
committer | karl-qdh <karl@qdh.org.uk> | 2011-02-16 15:38:52 +0000 |
commit | 6bc3639dcf711c00b635d3beb4def0b08f1250a2 (patch) | |
tree | 24e24ca44a08a68351f60a11171d5ab713efc24c | |
parent | fafc296c3f87a4fbfd4576aa23f26de53f90d4a0 (diff) | |
download | ayatana-indicator-datetime-6bc3639dcf711c00b635d3beb4def0b08f1250a2.tar.gz ayatana-indicator-datetime-6bc3639dcf711c00b635d3beb4def0b08f1250a2.tar.bz2 ayatana-indicator-datetime-6bc3639dcf711c00b635d3beb4def0b08f1250a2.zip |
Minor changes to objects freeing and NULLing the gerror
-rw-r--r-- | src/datetime-service.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index 1d09d15..70a1ed5 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -515,10 +515,11 @@ update_appointment_menu_items (gpointer user_data) { ECal *ecal = e_cal_new(source, E_CAL_SOURCE_TYPE_EVENT); //icaltimezone * tzone; - + if (!e_cal_open(ecal, FALSE, &gerror)) { g_debug("Failed to get ecal sources %s", gerror->message); g_error_free(gerror); + gerror = NULL continue; } @@ -534,7 +535,7 @@ update_appointment_menu_items (gpointer user_data) { allobjects = objects; } else if (objects != NULL) { allobjects = g_list_concat(allobjects, objects); - g_list_free(objects); + e_cal_free_object_list(objects); } } } @@ -670,7 +671,7 @@ update_appointment_menu_items (gpointer user_data) { if (i == 4) break; // See above FIXME regarding query result limit i++; } - g_list_free(allobjects); + e_cal_free_object_list(allobjects); g_debug("End of objects"); return TRUE; } |