From 81c96cec89dd280cab71170f50b9c088476d263c Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 3 Jul 2021 11:44:18 +0200 Subject: [PATCH] check key for NULL dereference, just in case This matches the check pattern in other parts of the code. --- svkbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svkbd.c b/svkbd.c index d80103a..68a2062 100644 --- a/svkbd.c +++ b/svkbd.c @@ -643,7 +643,8 @@ unpress(Key *k, KeySym buttonmod) } } - if (enableoverlays && currentoverlay != -1 && !IsModifierKey(k->keysym)) { + if (enableoverlays && currentoverlay != -1 && + (k == NULL || !IsModifierKey(k->keysym))) { if (releaseprotect) { releaseprotect = 0; } else {