diff --git a/src/xterm.c b/src/xterm.c index 8dc1067..5169292 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8801,7 +8801,7 @@ static void xembed_send_message (struct frame *f, Time, 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),