From 0005830ccc2791b249e2f33629e70de496a9de84 Mon Sep 17 00:00:00 2001 From: Jan D Date: Sun, 15 Aug 2010 15:18:14 +0200 Subject: [PATCH] * keyboard.c (parse_tool_bar_item): Put in a bad label if :label isn't a string. --- src/ChangeLog | 5 +++++ src/keyboard.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fc3d815ad49..e7a6d1c3132 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-08-15 Jan Djärv + + * keyboard.c (parse_tool_bar_item): Put in a bad label if :label + isn't a string. + 2010-08-15 Andreas Schwab * keyboard.c (parse_tool_bar_item): Avoid excessive use of strlen. diff --git a/src/keyboard.c b/src/keyboard.c index 6493fa5f9fd..570bf360eb5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8285,12 +8285,15 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) return 0; } else if (EQ (key, QChelp)) - /* `:help HELP-STRING'. */ - PROP (TOOL_BAR_ITEM_HELP) = value; + /* `:help HELP-STRING'. */ + PROP (TOOL_BAR_ITEM_HELP) = value; else if (EQ (key, QClabel)) { + const char *bad_label = "!!?GARBLED ITEM?!!"; /* `:label LABEL-STRING'. */ - PROP (TOOL_BAR_ITEM_LABEL) = value; + PROP (TOOL_BAR_ITEM_HELP) = STRINGP (value) + ? value + : make_string (bad_label, strlen (bad_label)); have_label = 1; } else if (EQ (key, QCfilter)) -- 2.39.2