changeset 86310:f0601f6fb8b0

(update_frame_tool_bar): Don't call x-gtk-map-stock if file for image is nil.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 22 Nov 2007 08:35:50 +0000
parents dfa2dd8a3423
children bfdcbe7d6197
files src/gtkutil.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutil.c	Thu Nov 22 08:35:31 2007 +0000
+++ b/src/gtkutil.c	Thu Nov 22 08:35:50 2007 +0000
@@ -3821,6 +3821,7 @@
       GtkWidget *wbutton = NULL;
       GtkWidget *weventbox;
       Lisp_Object func = intern ("x-gtk-map-stock");
+      Lisp_Object specified_file;
 
       ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (x->toolbar_widget), i);
 
@@ -3839,8 +3840,9 @@
           continue;
         }
 
-      if (EQ (Qt, Ffboundp (func))) 
-        stock = call1 (func, file_for_image (image));
+      specified_file = file_for_image (image);
+      if (!NILP (specified_file) && EQ (Qt, Ffboundp (func)))
+        stock = call1 (func, specified_file);
 
       if (! NILP (stock) && STRINGP (stock))
         {