Addl fix 510: Rudimentary video support
authorTomasz Golinski <tomaszg@math.uwb.edu.pl>
Mon, 16 Oct 2017 09:15:19 +0000 (10:15 +0100)
committerColin Clark <colin.clark@cclark.uk>
Mon, 16 Oct 2017 09:15:19 +0000 (10:15 +0100)
https://github.com/BestImageViewer/geeqie/issues/510
Segfaults when you click on the image area in an empty directory

src/layout_image.c

index a431637..b736e41 100644 (file)
@@ -1698,7 +1698,7 @@ static void layout_image_button_cb(ImageWindow *imd, GdkEventButton *event, gpoi
        switch (event->button)
                {
                case MOUSE_BUTTON_LEFT:
-                       if (options->image_l_click_video && options->image_l_click_video_editor && imd->image_fd->format_class == FORMAT_CLASS_VIDEO)
+                       if (options->image_l_click_video && options->image_l_click_video_editor && imd->image_fd && imd->image_fd->format_class == FORMAT_CLASS_VIDEO)
                                {
                                start_editor_from_file(options->image_l_click_video_editor, imd->image_fd);
                                }