1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-27 10:21:14 -08:00

Handle nil top frame (bug#76410)

* src/frame.c (do_switch_frame): Don't assume that top_frame is always a
frame, it can be nil.
This commit is contained in:
Gerd Möllmann 2025-02-19 08:05:56 +01:00
parent 9143c18ae4
commit 1194ebe3a7

View file

@ -1807,7 +1807,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
/* When FRAME's root frame is not its terminal's top frame, make
that root frame the new top frame of FRAME's terminal. */
if (root_frame (f) != XFRAME (top_frame))
if (NILP (top_frame) || root_frame (f) != XFRAME (top_frame))
{
struct frame *p = FRAME_PARENT_FRAME (f);