X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fevent-Xt.c;h=ccfde912b959f3eec9761c3533d4d94359eee82c;hb=24b9b0d2fe38a937a21841bb6ed9ae75cc3bd2c4;hp=961e70933b2aedd74d25701bf3849954d47bf367;hpb=499b5ad5e2308fd04e3654aaa462d099f1769fd1;p=chise%2Fxemacs-chise.git.1 diff --git a/src/event-Xt.c b/src/event-Xt.c index 961e709..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); @@ -868,7 +875,7 @@ emacs_Xt_mapping_action (Widget w, XEvent* event) case MappingKeyboard: x_reset_key_mapping (d); break; case MappingModifier: x_reset_modifier_mapping (d); break; case MappingPointer: /* Do something here? */ break; - default: abort(); + default: ABORT(); } } @@ -2380,7 +2387,7 @@ Xt_process_to_emacs_event (Lisp_Event *emacs_event) return; } } - abort (); + ABORT (); } static void @@ -3173,7 +3180,7 @@ XtConvertArgRec Const colorConvertArgs[] = { /* JH: We use this because I think there's a possibility this is called before the device is properly set up, in which case - I don't want to abort. */ + I don't want to ABORT. */ extern struct device *get_device_from_display_1 (Display *dpy); static