check key for NULL dereference, just in case

This matches the check pattern in other parts of the code.
This commit is contained in:
Hiltjo Posthuma 2021-07-03 11:44:18 +02:00
parent fd01322564
commit 81c96cec89
1 changed files with 2 additions and 1 deletions

View File

@ -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 {