fix sometimes crasher in vcalendar_get_current_item()
[claws.git] / 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