Add safety check in x_menu_show
* src/xmenu.c (x_menu_show): Explicitly check whether save_wv can be null here. Looks like it can be but I am not 100% sure, so play it safe and add a FIXME comment.
This commit is contained in:
parent
e1fb731393
commit
3b8dda6c90
1 changed files with 8 additions and 0 deletions
|
@ -1603,6 +1603,14 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
|
|||
STRINGP (help) ? help : Qnil);
|
||||
if (prev_wv)
|
||||
prev_wv->next = wv;
|
||||
else if (!save_wv)
|
||||
{
|
||||
/* This call to 'abort' pacifies gcc 11.2.1 when Emacs
|
||||
is configured with --enable-gcc-warnings. FIXME: If
|
||||
save_wv can be null, do something better; otherwise,
|
||||
explain why save_wv cannot be null. */
|
||||
abort ();
|
||||
}
|
||||
else
|
||||
save_wv->contents = wv;
|
||||
if (!NILP (descrip))
|
||||
|
|
Loading…
Add table
Reference in a new issue