fix sometimes crasher in vcalendar_get_current_item()
authorpaul <paul@claws-mail.org>
Tue, 3 Nov 2020 09:03:59 +0000 (09:03 +0000)
committerwwp <subscript@free.fr>
Tue, 3 Nov 2020 09:45:08 +0000 (10:45 +0100)
thanks to Paul Rolland

src/plugins/vcalendar/vcalendar.c

index 81a2299c7d834981b2a75d6df50ae60648a71652..cd08e5588535154f11150c48f19d0bf7656228ea 100644 (file)
@@ -446,6 +446,8 @@ static FolderItem *vcalendar_get_current_item(void)
        
        if (mainwin) {
                item = mainwin->summaryview->folder_item;
+               if (item == NULL)
+                       return NULL;
                if (item->folder == folder)
                        return item;
                else