emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Gerd Moellmann
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Sat, 17 Nov 2001 05:46:24 -0500

Index: emacs/src/xdisp.c
diff -u emacs/src/xdisp.c:1.705 emacs/src/xdisp.c:1.706
--- emacs/src/xdisp.c:1.705     Fri Nov 16 08:09:11 2001
+++ emacs/src/xdisp.c   Sat Nov 17 05:46:24 2001
@@ -7935,11 +7935,18 @@
 {
   Lisp_Object prop;
   int success_p;
+  int charpos;
+
+  /* This function can be called asynchronously, which means we must
+     exclude any possibility that Fget_text_property signals an
+     error.  */
+  charpos = min (XSTRING (f->current_tool_bar_string)->size, glyph->charpos);
+  charpos = max (0, charpos);
   
   /* Get the text property `menu-item' at pos. The value of that
      property is the start index of this item's properties in
      F->tool_bar_items.  */
-  prop = Fget_text_property (make_number (glyph->charpos),
+  prop = Fget_text_property (make_number (charpos),
                             Qmenu_item, f->current_tool_bar_string);
   if (INTEGERP (prop))
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]