changeset 109821:c917fbc9b294

* src/gtkutil.c (update_frame_tool_bar): Don't assume TOOL_BAR_ITEM_LABEL is a string.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 17 Aug 2010 23:43:47 +0200
parents 33724382fa3f
children 23ac97042af1 46f382b913d6
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Aug 17 23:05:26 2010 +0200
+++ b/src/ChangeLog	Tue Aug 17 23:43:47 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* gtkutil.c (update_frame_tool_bar): Don't assume TOOL_BAR_ITEM_LABEL
+	is a string.
+
 2010-08-17  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* nsfns.m (ns_frame_parm_handlers): Add a slot for the
@@ -41,8 +46,9 @@
 
 2010-08-15  Jan Djärv  <jan.h.d@swipnet.se>
 
-	* keyboard.c (parse_tool_bar_item): malloc buf.  Set TOOL_BAR_ITEM_LABEL
-	to empty string if not set to new_lbl (Bug#6855).
+	* keyboard.c (parse_tool_bar_item): malloc buf.
+	Set TOOL_BAR_ITEM_LABEL to empty string if not set to
+	new_lbl (Bug#6855).
 
 2010-08-14  Eli Zaretskii  <eliz@gnu.org>
 
@@ -50,8 +56,8 @@
 	* w32term.c (x_draw_stretch_glyph_string): In R2L rows, display
 	the cursor on the right edge of the stretch glyph.
 
-	* xdisp.c (window_box_right_offset, window_box_right): Fix
-	commentary.
+	* xdisp.c (window_box_right_offset, window_box_right):
+	Fix commentary.
 
 	* xdisp.c (Fcurrent_bidi_paragraph_direction): Fix paragraph
 	direction when point is inside a run of whitespace characters.
--- a/src/gtkutil.c	Tue Aug 17 23:05:26 2010 +0200
+++ b/src/gtkutil.c	Tue Aug 17 23:43:47 2010 +0200
@@ -4292,7 +4292,8 @@
       GtkWidget *wbutton = NULL;
       GtkWidget *weventbox;
       Lisp_Object specified_file;
-      char *label = SSDATA (PROP (TOOL_BAR_ITEM_LABEL));
+      char *label = (STRINGP (PROP (TOOL_BAR_ITEM_LABEL))
+		     ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) : "");
       
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), i);