Actually encrypt passwords before storing them
[claws.git] / src / plugins / vcalendar / vcal_dbus.c
index dad54c1..38d86b3 100644 (file)
@@ -103,11 +103,15 @@ static void handle_method_call (GDBusConnection       *connection,
                /* Don't free that, it's done when subscriptions are
                 * fetched */
                icalcomponent *ical = (icalcomponent *)cur->data;
-               VCalEvent *event = vcal_get_event_from_ical(
-                       icalcomponent_as_ical_string(ical), NULL);
-
-               add_event_to_builder_if_match(event, array, start, end);
-               g_free(event);
+               if (ical != NULL) {
+                       VCalEvent *event = vcal_get_event_from_ical(
+                               icalcomponent_as_ical_string(ical), NULL);
+                       if (event != NULL) {
+                               add_event_to_builder_if_match(
+                                       event, array, start, end);
+                               g_free(event);
+                       }
+               }
        }
        g_slist_free(list);
 
@@ -172,6 +176,7 @@ static void bus_acquired(GDBusConnection *connection,
 
 void connect_dbus(void)
 {
+       debug_print("connect_dbus() invoked\n");
        introspection_data = g_dbus_node_info_new_for_xml(
                                introspection_xml, NULL);
        if (introspection_data == NULL) {
@@ -194,6 +199,7 @@ void connect_dbus(void)
 
 void disconnect_dbus(void)
 {
+       debug_print("disconnect_dbus() invoked\n");
        g_bus_unown_name(dbus_own_id);
 }