Bug fix: Segfault in pan view
authorColin Clark <colin.clark@cclark.uk>
Tue, 19 Sep 2017 08:51:20 +0000 (09:51 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 19 Sep 2017 08:51:20 +0000 (09:51 +0100)
If an image is double-clicked in pan view, Geeqie crashes

src/image.c

index de44101..52591a8 100644 (file)
@@ -73,7 +73,8 @@ static void image_press_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer d
        LayoutWindow *lw;
 
        lw = layout_find_by_image(imd);
-       if (event->button == MOUSE_BUTTON_LEFT && event->type == GDK_2BUTTON_PRESS  && !options->image_lm_click_nav)
+       if (lw && event->button == MOUSE_BUTTON_LEFT && event->type == GDK_2BUTTON_PRESS
+                                                                                               && !options->image_lm_click_nav)
                {
                if (lw->full_screen)
                        layout_image_full_screen_stop(lw);