diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2012-04-01 18:42:57 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2012-04-01 18:42:57 +0200 |
commit | 3b0512a3d5c5ef30308bc466d914c4282153d453 (patch) | |
tree | b6e6f894162a478fe41036880c707dac4e03b93d /src/w32menu.c | |
parent | d6ec6cb42b6f4ee90aa2237bb8f4f465ffd1f5b7 (diff) | |
download | emacs-3b0512a3d5c5ef30308bc466d914c4282153d453.tar.gz |
Fixes: debbugs:11141
* w32menu.c (is_simple_dialog): Properly check lisp types.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r-- | src/w32menu.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index b5cc6801a72..b25edf0f269 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps, static int is_simple_dialog (Lisp_Object contents) { - Lisp_Object options = XCDR (contents); + Lisp_Object options; Lisp_Object name, yes, no, other; + if (!CONSP (contents)) + return 0; + options = XCDR (contents); + yes = build_string ("Yes"); no = build_string ("No"); if (!CONSP (options)) return 0; - name = XCAR (XCAR (options)); - if (!CONSP (options)) + name = XCAR (options); + if (!CONSP (name)) return 0; + name = XCAR (name); if (!NILP (Fstring_equal (name, yes))) other = no; @@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents) if (!CONSP (options)) return 0; - name = XCAR (XCAR (options)); + name = XCAR (options); + if (!CONSP (name)) + return 0; + name = XCAR (name); if (NILP (Fstring_equal (name, other))) return 0; |