Improve safety of handling unsupported drop events on X
* src/keyboard.c (kbd_buffer_get_event): * src/xterm.c (handle_one_xevent): Check that the event frame is still live after calling arbitrary Lisp code.
This commit is contained in:
parent
a57687dc0e
commit
44e5339e82
2 changed files with 10 additions and 0 deletions
|
@ -4041,6 +4041,11 @@ kbd_buffer_get_event (KBOARD **kbp,
|
|||
break;
|
||||
}
|
||||
|
||||
/* `x-dnd-unsupported-drop-function' could have deleted the
|
||||
event frame. */
|
||||
if (!FRAME_LIVE_P (f))
|
||||
break;
|
||||
|
||||
x_dnd_do_unsupported_drop (FRAME_DISPLAY_INFO (f),
|
||||
event->ie.frame_or_window,
|
||||
XCAR (event->ie.arg),
|
||||
|
|
|
@ -10112,6 +10112,11 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction,
|
|||
continue;
|
||||
}
|
||||
|
||||
/* `x-dnd-unsupported-drop-function' could have deleted the
|
||||
event frame. */
|
||||
if (!FRAME_LIVE_P (event_frame))
|
||||
continue;
|
||||
|
||||
x_dnd_do_unsupported_drop (FRAME_DISPLAY_INFO (event_frame),
|
||||
event->ie.frame_or_window,
|
||||
XCAR (event->ie.arg),
|
||||
|
|
Loading…
Add table
Reference in a new issue