diff options
-rw-r--r-- | framebuffer/gui.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framebuffer/gui.c b/framebuffer/gui.c index 27ef56fe3..eecfe7f37 100644 --- a/framebuffer/gui.c +++ b/framebuffer/gui.c @@ -479,11 +479,11 @@ void gui_poll(bool active) if (!active) timeout = -1; - fbtk_event(fbtk, &event, timeout); - - if ((event.type == NSFB_EVENT_CONTROL) && - (event.value.controlcode == NSFB_CONTROL_QUIT)) - netsurf_quit = true; + if (fbtk_event(fbtk, &event, timeout)) { + if ((event.type == NSFB_EVENT_CONTROL) && + (event.value.controlcode == NSFB_CONTROL_QUIT)) + netsurf_quit = true; + } fbtk_redraw(fbtk); |