aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xkb/XKBNames.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/xkb/XKBNames.c')
-rw-r--r--libX11/src/xkb/XKBNames.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libX11/src/xkb/XKBNames.c b/libX11/src/xkb/XKBNames.c
index 3f2fd39d7..5a3fb6f8d 100644
--- a/libX11/src/xkb/XKBNames.c
+++ b/libX11/src/xkb/XKBNames.c
@@ -778,9 +778,14 @@ XkbNoteNameChanges(XkbNameChangesPtr old,
{
int first, last, old_last, new_last;
- wanted &= new->changed;
- if ((old == NULL) || (new == NULL) || (wanted == 0))
+ if ((old == NULL) || (new == NULL))
return;
+
+ wanted &= new->changed;
+
+ if (wanted == 0)
+ return;
+
if (wanted & XkbKeyTypeNamesMask) {
if (old->changed & XkbKeyTypeNamesMask) {
new_last = (new->first_type + new->num_types - 1);