X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fevent-Xt.c;h=ccfde912b959f3eec9761c3533d4d94359eee82c;hb=60d2b57b2fdc60d3a6a151a67f95b88db825084b;hp=31dd6c6f0fae9705c3a71e6203680ce2449f2290;hpb=ee38d21b330f5001b47a577cefb5ba7b82a3b7d3;p=chise%2Fxemacs-chise.git.1 diff --git a/src/event-Xt.c b/src/event-Xt.c index 31dd6c6..ccfde91 100644 --- a/src/event-Xt.c +++ b/src/event-Xt.c @@ -461,7 +461,14 @@ x_reset_modifier_mapping (struct device *d) xd->lock_interpretation = 0; if (xd->x_modifier_keymap) - XFreeModifiermap (xd->x_modifier_keymap); + { + XFreeModifiermap (xd->x_modifier_keymap); + /* Set it to NULL in case we receive two MappingModifier events in a + row, and the second is processed during some CHECK_QUITs within + x_reset_key_mapping. If that happens, XFreeModifierMap will be + called twice on the same map, and we crash. */ + xd->x_modifier_keymap = NULL; + } x_reset_key_mapping (d);