From bd2c9e810cdca63ea05b047d0ca761c85ce82694 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 10 Mar 2021 09:20:34 -0500 Subject: [PATCH] One more check on valid display which is known to be in the startup path. --- events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/events.c b/events.c index 1f846e6..80b8e4a 100644 --- a/events.c +++ b/events.c @@ -2399,6 +2399,9 @@ int getkeysignature(XKeyEvent *event) if (event->keycode == 0 && event->state == 0) return -1; #endif + /* XLookupString() will fail if the display is not valid */ + if (dpy == NULL) return -1; + XLookupString(event, _STR, 150, &keypressed, NULL); /* Ignore Shift, Control, Caps Lock, and Meta (Alt) keys */ -- 2.11.4.GIT