diff options
Diffstat (limited to 'nx-X11/lib/src/xkb/XKBNames.c')
-rw-r--r-- | nx-X11/lib/src/xkb/XKBNames.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nx-X11/lib/src/xkb/XKBNames.c b/nx-X11/lib/src/xkb/XKBNames.c index 951fd1da8..c14329203 100644 --- a/nx-X11/lib/src/xkb/XKBNames.c +++ b/nx-X11/lib/src/xkb/XKBNames.c @@ -205,14 +205,14 @@ _XkbReadGetNamesReply(Display *dpy, if (rep->nRadioGroups > 0) { Atom *rgNames; - if (names->radio_groups == NULL) - names->radio_groups = _XkbTypedCalloc(rep->nRadioGroups, Atom); - else if (names->num_rg < rep->nRadioGroups) { - names->radio_groups = _XkbTypedRealloc(names->radio_groups, - rep->nRadioGroups, Atom); + if ((names->radio_groups == NULL) || + (names->num_rg < rep->nRadioGroups)) { + _XkbResizeArray(names->radio_groups, names->num_rg, + rep->nRadioGroups, Atom); } rgNames = names->radio_groups; if (!rgNames) { + names->num_rg = 0; goto BAILOUT; } if (!_XkbReadBufferCopy32 |