Jerry James writes:
Okay, I propose this patch. If nobody objects, I will commit it in
day or two. Hmmm, upon looking at my changelog entry again, I can
suddenly hear Jeff Lynne singing, "Don't bring me down..."
I prefer Neil Young's classic live intro "This is a song that's
guaranteed to bring you right down. It's called 'Don't Let It Bring
data = compute_menubar_data (f, menubar, deep_p);
- assert (data && (data->next || data->contents));
+ if (!data || (!data->next && !data->contents))
+ return 0;
The problem with this simple patch is that you may just be pushing the
crash around. There's another call to compute_menubar_data later in
menubar-x.c at line 596; make sure it is similarly protected if
necessary. Grep says those are the only calls (it's static so all
calls are in menubar-x.c).
There probably also should be a comment on compute_menubar_data
warning that it can return NULL.
I wonder if it *should* be able to return NULL, or if there's a bug
XEmacs-Patches mailing list