# HG changeset patch # User Jan Dj¸«£rv # Date 1195720550 0 # Node ID f0601f6fb8b063edc41939c14ef117ab5582e1ec # Parent dfa2dd8a34234abe5ea6ecc320615be00152f019 (update_frame_tool_bar): Don't call x-gtk-map-stock if file for image is nil. diff -r dfa2dd8a3423 -r f0601f6fb8b0 src/gtkutil.c --- 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)) {