Fix segfault when calling frame_ancestor_p (Bug#26493)

* src/xterm.c (handle_one_xevent): Check that hf was not reset
before calling frame_ancestor_p (Bug#26493).
This commit is contained in:
Martin Rudalics 2017-04-14 12:14:09 +02:00
parent 96644ed496
commit fc05d4fec9

View file

@ -8801,7 +8801,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
frame. */
struct frame *hf = dpyinfo->x_highlight_frame;
if (FRAME_PARENT_FRAME (f) || frame_ancestor_p (f, hf))
if (FRAME_PARENT_FRAME (f) || (hf && frame_ancestor_p (f, hf)))
{
block_input ();
XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),