On Wed, Jan 16, 2013 at 4:05 PM, Mats Lidell <matsl(a)xemacs.org> wrote:
If a bug in a menu specification can cause this then it should, as
you
suggest, handle it gracefully. +1
Okay, I propose this patch. If nobody objects, I will commit it in a
day or two. Hmmm, upon looking at my changelog entry again, I can
suddenly hear Jeff Lynne singing, "Don't bring me down..."
diff -r 8b5bdc8aebfd src/ChangeLog
--- a/src/ChangeLog Sat Jan 05 02:11:23 2013 +0900
+++ b/src/ChangeLog Wed Jan 16 16:45:51 2013 -0700
@@ -1,3 +1,9 @@
+2013-01-16 Jerry James <james(a)xemacs.org>
+
+ * menubar-x.c (set_frame_menubar): when a menubar specification has an
+ error, don't fail an assert() and bring XEmacs down. Instead, return
+ 0 to just skip the faulty menu and show any errors in *Warnings*.
+
2013-01-04 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.33 "horseradish" is released.
diff -r 8b5bdc8aebfd src/menubar-x.c
--- a/src/menubar-x.c Sat Jan 05 02:11:23 2013 +0900
+++ b/src/menubar-x.c Wed Jan 16 16:45:51 2013 -0700
@@ -573,7 +573,8 @@
menubar_visible = !NILP (w->menubar_visible_p);
data = compute_menubar_data (f, menubar, deep_p);
- assert (data && (data->next || data->contents));
+ if (!data || (!data->next && !data->contents))
+ return 0;
if (!FRAME_X_MENUBAR_ID (f))
FRAME_X_MENUBAR_ID (f) = new_lwlib_id ();
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta