fix bug 3531, 'a/z hotkeys crash Claws immediately after startup'
authorPaul <paul@claws-mail.org>
Fri, 2 Oct 2015 16:37:51 +0000 (17:37 +0100)
committerPaul <paul@claws-mail.org>
Fri, 2 Oct 2015 16:37:51 +0000 (17:37 +0100)
src/mimeview.c

index 038abf6..019c94a 100644 (file)
@@ -1558,6 +1558,8 @@ void mimeview_select_next_part(MimeView *mimeview)
        MimeInfo *partinfo = NULL;
        gboolean has_next;
        
+       if (!mimeview->opened) return;
+
        gtk_tree_model_get_iter(model, &iter, mimeview->opened);
        path = gtk_tree_model_get_path(model, &iter);
 skip:
@@ -1591,6 +1593,8 @@ void mimeview_select_prev_part(MimeView *mimeview)
        MimeInfo *partinfo = NULL;
        gboolean has_prev;
        
+       if (!mimeview->opened) return;
+
        gtk_tree_model_get_iter(model, &iter, mimeview->opened);
        path = gtk_tree_model_get_path(model, &iter);
 skip: