From: Colin Clark Date: Fri, 24 Sep 2021 09:36:50 +0000 (+0100) Subject: Bug fix #229: File Compression and Archiving X-Git-Tag: v1.7~50 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=a55e6421bb8260e624ed764674998396b572e3d9 Bug fix #229: File Compression and Archiving https://github.com/BestImageViewer/geeqie/issues/299 Null fd not checked for. --- diff --git a/src/view_file/view_file.c b/src/view_file/view_file.c index 58ba46b4..1d4eaf39 100644 --- a/src/view_file/view_file.c +++ b/src/view_file/view_file.c @@ -624,11 +624,11 @@ GtkWidget *vf_pop_menu(ViewFile *vf) case FILEVIEW_LIST: vflist_color_set(vf, VFLIST(vf)->click_fd, TRUE); active = (VFLIST(vf)->click_fd != NULL); - class_archive = (VFLIST(vf)->click_fd->format_class == FORMAT_CLASS_ARCHIVE); + class_archive = (VFLIST(vf)->click_fd != NULL && VFLIST(vf)->click_fd->format_class == FORMAT_CLASS_ARCHIVE); break; case FILEVIEW_ICON: active = (VFICON(vf)->click_fd != NULL); - class_archive = (VFICON(vf)->click_fd->format_class == FORMAT_CLASS_ARCHIVE); + class_archive = (VFICON(vf)->click_fd != NULL && VFICON(vf)->click_fd->format_class == FORMAT_CLASS_ARCHIVE); break; }