changeset 24341:9028f3cd0a5e

(easy-menu-get-map): Don't crash if (current-local-map) is nil.
author Richard M. Stallman <rms@gnu.org>
date Thu, 18 Feb 1999 01:10:46 +0000
parents 9d52c9051940
children 39caae99e25d
files lisp/emacs-lisp/easymenu.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/easymenu.el	Wed Feb 17 18:16:13 1999 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Thu Feb 18 01:10:46 1999 +0000
@@ -479,8 +479,9 @@
   ;; Return a sparse keymap in which to add or remove an item.
   ;; MAP and PATH are as defined in `easy-menu-add-item'.
   (if (null map)
-      (let ((local (lookup-key (current-local-map)
-			       (vconcat '(menu-bar) (mapcar 'intern path))))
+      (let ((local (and (current-local-map)
+			(lookup-key (current-local-map)
+				    (vconcat '(menu-bar) (mapcar 'intern path)))))
 	    (global (lookup-key global-map
 				(vconcat '(menu-bar) (mapcar 'intern path)))))
 	(if (and local (not (integerp local)))