Fix possible access to uninitilized folder pointer (CID 1402515),
authorwwp <wwp@free.fr>
Sat, 17 Mar 2018 20:28:00 +0000 (21:28 +0100)
committerwwp <wwp@free.fr>
Sat, 17 Mar 2018 20:28:00 +0000 (21:28 +0100)
add a warning if vcal folder's not found.

src/plugins/vcalendar/vcal_manager.c

index 251adc9..8b9a9b5 100644 (file)
@@ -1451,10 +1451,11 @@ static gboolean vcal_manager_send (PrefsAccount         *account,
        g_free(msgpath);
 
        folder = folder_find_from_name ("vCalendar", vcal_folder_get_class());
-       if (folder)
+       if (folder) {
                folder_item_scan(folder->inbox);
-
-       vcalviewer_reload(folder->inbox);
+               vcalviewer_reload(folder->inbox);
+       } else
+               g_warning("couldn't find vCalendar folder %s", vcal_folder_get_class());
        return TRUE;
 }