x11: try to fix crash in xkb_x11_keymap_new_from_device error handling
authorRan Benita <ran@unusedvar.com>
Tue, 31 Aug 2021 18:50:52 +0000 (21:50 +0300)
committerRan Benita <ran@unusedvar.com>
Thu, 9 Sep 2021 13:52:47 +0000 (16:52 +0300)
commit4a576ab1844f68ca1eb8da922e863eb426e38957
tree3217f013b434d0b64d33a30a0f04ac5d482c8752
parent4e361712d2ccd9fae30972c97ad290dc238e9913
x11: try to fix crash in xkb_x11_keymap_new_from_device error handling

In 1b3a1c277a033083fee669e92c8cad862716ebd1 we changed the error
handling in this code to not bail out immediately but only after
everything has been processed, to simplify the code. But I suspect the
code isn't prepared for this and that's what causing the crash reported
in the issue.

Bring back the short-circuit error handling which would hopefully fix
such crashes.

Fixes: https://github.com/xkbcommon/libxkbcommon/issues/252
Signed-off-by: Ran Benita <ran@unusedvar.com>
src/x11/keymap.c