diff options
-rw-r--r-- | vmod.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -226,13 +226,14 @@ LookupVModMask(XPointer priv, int FindKeypadVMod(XkbDescPtr xkb) { - Atom name; - ExprResult rtrn; + if (xkb) { + Atom name = XkbInternAtom(xkb->dpy, "NumLock", False); + ExprResult rtrn; - name = XkbInternAtom(xkb->dpy, "NumLock", False); - if ((xkb) && LookupVModIndex((XPointer) xkb, None, name, TypeInt, &rtrn)) - { - return rtrn.ival; + if (LookupVModIndex((XPointer) xkb, None, name, TypeInt, &rtrn)) + { + return rtrn.ival; + } } return -1; } |