New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when turn on auto zoom via menu #58

Closed
livibetter opened this Issue Aug 16, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@livibetter
Contributor

livibetter commented Aug 16, 2011

Since 083a71e, the winwid was NULL when I

  • right click to open menu
  • select autozoom (probably all menu option could make winwid has NULL, but I only used autozoom)
  • Segmentation fault
diff --git a/src/events.c b/src/events.c
index 235ad53..48b3cc1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -80,7 +80,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
                        winwidget_show_menu(winwid);
                }
        } else if ((ev->xbutton.button == opt.rotate_button)
-                  && (winwid->type != WIN_TYPE_THUMBNAIL)
+                  && (winwid && winwid->type != WIN_TYPE_THUMBNAIL)
                   && ((opt.no_rotate_ctrl_mask)
                       || (ev->xbutton.state & ControlMask))) {
                if (winwid != NULL) {
@@ -89,7 +89,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
                        D(("rotate starting at %d, %d\\n", ev->xbutton.x, ev->xb
utton.y));
                }
        } else if ((ev->xbutton.button == opt.blur_button)
-                  && (winwid->type != WIN_TYPE_THUMBNAIL)
+                  && (winwid && winwid->type != WIN_TYPE_THUMBNAIL)
                   && ((opt.no_blur_ctrl_mask)
                       || (ev->xbutton.state & ControlMask))) {
                if (winwid != NULL) {
@Meyithi

This comment has been minimized.

Meyithi commented Aug 16, 2011

This seems to be happening with all menu options - https://bugs.archlinux.org/task/25612

@derf

This comment has been minimized.

Owner

derf commented Aug 16, 2011

Arg. Yeah, major fail on my side. Thanks for the patch!

@derf derf closed this in dfb6063 Aug 16, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment