aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/x11.c b/src/x11.c
index 96a7e17..2872612 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -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;