diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/x11_in_gtk2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index cc33992..fd3547a 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -135,7 +135,9 @@ event_filter(GdkXEvent* xevent, GdkEvent* event, gpointer data) { SuilX11Wrapper* wrap = (SuilX11Wrapper*)data; XEvent* ev = (XEvent*)xevent; - if (wrap->instance->handle && (ev->type == KeyPress || ev->type == KeyRelease)) { + if (wrap->instance && + wrap->instance->handle && + (ev->type == KeyPress || ev->type == KeyRelease)) { // Forward keyboard events to UI window XSendEvent(ev->xkey.display, (Window)wrap->instance->ui_widget, 1, 0, ev); XSync(ev->xkey.display, TRUE); |