dwm

personal fork of dwm (rnpnr branch)
git clone anongit@rnpnr.xyz:dwm.git
Log | Files | Refs | Feed | README | LICENSE

Commit: ebfe6719885e1b567d59828be3dc27cb5a0d4adf
Parent: d587dd65a4d55c810438336170301b67e69dcade
Author: Hiltjo Posthuma
Date:   Tue, 13 Oct 2026 14:39:44 +0200

check return value of XGetModifierMapping

Diffstat:
Mdwm.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dwm.c b/dwm.c @@ -1955,7 +1955,8 @@ updatenumlockmask(void) XModifierKeymap *modmap; numlockmask = 0; - modmap = XGetModifierMapping(dpy); + if (!(modmap = XGetModifierMapping(dpy))) + return; for (i = 0; i < 8; i++) for (j = 0; j < modmap->max_keypermod; j++) if (modmap->modifiermap[i * modmap->max_keypermod + j]