0.9.10claws45
authorChristoph Hohmann <reboot@gmx.ch>
Wed, 14 Apr 2004 18:25:31 +0000 (18:25 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Wed, 14 Apr 2004 18:25:31 +0000 (18:25 +0000)
* src/folder.c
* src/plugins/image_viewer/viewer.c
        fix g_warnings

ChangeLog.claws
configure.ac
src/folder.c
src/plugins/image_viewer/viewer.c

index b1e5188..6a3a3c8 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-14 [christoph] 0.9.10claws45
+
+       * src/folder.c
+       * src/plugins/image_viewer/viewer.c
+               fix g_warnings
+
 2004-04-10 [alfons]    0.9.10claws44
        
        * src/compose.c
index 1ca5de5..cea4dab 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=44
+EXTRA_VERSION=45
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 854d436..e063b26 100644 (file)
@@ -1837,16 +1837,20 @@ void folder_item_read_cache(FolderItem *item)
        
        g_return_if_fail(item != NULL);
 
-       cache_file = folder_item_get_cache_file(item);
-       mark_file = folder_item_get_mark_file(item);
-       item->cache = msgcache_read_cache(item, cache_file);
-       if (!item->cache) {
+       if (item->path != NULL) {
+               cache_file = folder_item_get_cache_file(item);
+               mark_file = folder_item_get_mark_file(item);
+               item->cache = msgcache_read_cache(item, cache_file);
+               if (!item->cache) {
+                       item->cache = msgcache_new();
+                       folder_item_scan_full(item, TRUE);
+               }
+               msgcache_read_mark(item->cache, mark_file);
+               g_free(cache_file);
+               g_free(mark_file);
+       } else {
                item->cache = msgcache_new();
-               folder_item_scan_full(item, TRUE);
        }
-       msgcache_read_mark(item->cache, mark_file);
-       g_free(cache_file);
-       g_free(mark_file);
 
        folder_clean_cache_memory();
 }
index 9421a60..3741451 100644 (file)
@@ -191,6 +191,9 @@ static void image_viewer_load_image(ImageViewer *imageviewer)
 {
        gchar *imgfile;
 
+       if (imageviewer->mimeinfo == NULL)
+               return;
+
        imgfile = procmime_get_tmp_file_name(imageviewer->mimeinfo);
        if (procmime_get_part(imgfile, imageviewer->mimeinfo) < 0) {
                g_warning("Can't get mimepart file");