summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events.c b/src/events.c
index 235ad53..96408e1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -79,7 +79,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
if (winwid != NULL) {
winwidget_show_menu(winwid);
}
- } else if ((ev->xbutton.button == opt.rotate_button)
+ } else if (winwid && (ev->xbutton.button == opt.rotate_button)
&& (winwid->type != WIN_TYPE_THUMBNAIL)
&& ((opt.no_rotate_ctrl_mask)
|| (ev->xbutton.state & ControlMask))) {
@@ -88,7 +88,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
winwid->mode = MODE_ROTATE;
D(("rotate starting at %d, %d\n", ev->xbutton.x, ev->xbutton.y));
}
- } else if ((ev->xbutton.button == opt.blur_button)
+ } else if (winwid && (ev->xbutton.button == opt.blur_button)
&& (winwid->type != WIN_TYPE_THUMBNAIL)
&& ((opt.no_blur_ctrl_mask)
|| (ev->xbutton.state & ControlMask))) {