From: Martin Rudalics Date: Fri, 14 Apr 2017 10:14:09 +0000 (+0200) Subject: Fix segfault when calling frame_ancestor_p (Bug#26493) X-Git-Tag: emacs-26.0.90~521^2~629 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc05d4fec98387097c30a5c60e2f343cb797af26;p=emacs.git 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). --- diff --git a/src/xterm.c b/src/xterm.c index 8dc1067a688..51692921708 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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),