From f692950aaf0e9dc3cf275b25bfcc0b1df9a96bb6 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sat, 1 Jan 2022 16:30:57 +0000 Subject: [PATCH] Bug fix: Seg fault - view menu If Geeqie is opened with no image displayed, selecting the View menu will cause a seg fault --- src/layout_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout_util.c b/src/layout_util.c index 19a89237..e77b8c0e 100644 --- a/src/layout_util.c +++ b/src/layout_util.c @@ -2273,7 +2273,7 @@ static void layout_menu_view_menu_cb(GtkWidget *widget, gpointer data) menu_label = g_strdup(gtk_menu_item_get_label(GTK_MENU_ITEM(iter->data))); if (g_strcmp0(menu_label, _("Open archive")) == 0) { - if (fd->format_class == FORMAT_CLASS_ARCHIVE) + if (fd && fd->format_class == FORMAT_CLASS_ARCHIVE) { gtk_widget_set_sensitive(GTK_WIDGET(iter->data), TRUE); } -- 2.20.1