Avoid assertion violations in 'display_menu_bar'

* src/xdisp.c (display_menu_bar): Return immediately if the
menu-bar items were not yet computed.  This avoids assertion
violations when this function is called as part of creating a new
frame.  (Bug#80603)
This commit is contained in:
Eli Zaretskii
2026-03-13 15:57:05 +02:00
parent 5c2cb4ced4
commit 4a81c87a7c

View File

@@ -27561,6 +27561,10 @@ display_menu_bar (struct window *w)
return;
#endif /* HAVE_HAIKU */
/* Don't do all this if the frame's menu bar is not yet set. */
if (NILP (FRAME_MENU_BAR_ITEMS (f)))
return;
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
eassert (!FRAME_WINDOW_P (f));
init_iterator (&it, w, -1, -1, f->desired_matrix->rows, MENU_FACE_ID);