fixed some precondition in folder item
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Fri, 26 Jul 2002 18:24:39 +0000 (18:24 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Fri, 26 Jul 2002 18:24:39 +0000 (18:24 +0000)
src/folder.c

index cf2fb56..2944caa 100644 (file)
@@ -282,12 +282,14 @@ void folder_item_destroy(FolderItem *item)
 
        debug_print(_("Destroying folder item %s\n"), item->path);
 
-       switch (item->folder->type) {
-       case F_IMAP:
-               imap_folder_item_destroy(item);
-               break;
-       default:
-               break;
+       if (item->folder != NULL) {
+               switch (item->folder->type) {
+               case F_IMAP:
+                       imap_folder_item_destroy(item);
+                       break;
+               default:
+                       break;
+               }
        }
 
        if(item->cache)