From: Jan Djärv Date: Thu, 22 Nov 2007 08:35:57 +0000 (+0000) Subject: (update_frame_tool_bar): Don't call x-gtk-map-stock if X-Git-Tag: emacs-pretest-23.0.90~9569 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d4ad8c0488f1d78b147f93e5b76edbe41a037e2f;p=emacs.git (update_frame_tool_bar): Don't call x-gtk-map-stock if file for image is nil. --- diff --git a/src/ChangeLog b/src/ChangeLog index f5a86a78ce2..a9bac7dbf6b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-11-22 Jan Dj,Ad(Brv + + * gtkutil.c (update_frame_tool_bar): Don't call x-gtk-map-stock if + file for image is nil. + 2007-11-22 Dan Nicolaescu * term.c: Include stdarg.h. diff --git a/src/gtkutil.c b/src/gtkutil.c index 77d5fd65649..41926ace154 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3821,6 +3821,7 @@ update_frame_tool_bar (f) 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 @@ update_frame_tool_bar (f) 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)) {