diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/x11_in_gtk2.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -1,9 +1,10 @@ suil (0.6.7) unstable; + * Fix crash in x11_in_gtk2 when event_filter fires before widget is realized * Use libgtk-x11-2.0.so.0 (with .0 suffix) by default which is available on systems without the dev package - -- David Robillard <d@drobilla.net> Wed, 19 Dec 2012 18:25:49 -0500 + -- David Robillard <d@drobilla.net> Wed, 19 Dec 2012 20:32:53 -0500 suil (0.6.6) stable; 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); |