diff options
author | David Robillard <d@drobilla.net> | 2023-01-11 14:25:55 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-11 14:27:08 -0500 |
commit | 8ade9137d3ccd70efa19b9e23a7083a49691066a (patch) | |
tree | a8f52238b4265a5dfd7aa4468dde6dea9e34badf | |
parent | a1b9aa4e4b5c8e663d134257b17afbd9dd8bc2ba (diff) | |
download | pugl-8ade9137d3ccd70efa19b9e23a7083a49691066a.tar.gz pugl-8ade9137d3ccd70efa19b9e23a7083a49691066a.tar.bz2 pugl-8ade9137d3ccd70efa19b9e23a7083a49691066a.zip |
X11: Make puglSendEvent() gracefully handle unrealized views
-rw-r--r-- | src/x11.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1447,6 +1447,9 @@ puglSendEvent(PuglView* const view, const PuglEvent* const event) PuglInternals* const impl = view->impl; Display* const display = view->world->impl->display; XEvent xev = PUGL_INIT_STRUCT; + if (!impl->win) { + return PUGL_FAILURE; + } if (event->type == PUGL_CLOSE) { xev.xclient.type = ClientMessage; |