diff options
| author | Eli Zaretskii | 2021-05-11 16:37:37 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-05-11 16:37:37 +0300 |
| commit | c9bf4e7f4320363c8cea87a60efc31d8dfd18dd9 (patch) | |
| tree | b416c78762e84ee71fd129782c503af84221c291 /src | |
| parent | 2db8a3257cad5a0b95a4754f8709cf93a5c49bd0 (diff) | |
| download | emacs-c9bf4e7f4320363c8cea87a60efc31d8dfd18dd9.tar.gz emacs-c9bf4e7f4320363c8cea87a60efc31d8dfd18dd9.zip | |
Fix assertions in nth_minibuffer
* src/minibuf.c (nth_minibuffer): Avoid assertion violation when
DEPTHth minibuffer doesn't exist. (Bug#48337)
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 167aece973a..52d1275451b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -969,6 +969,8 @@ static Lisp_Object | |||
| 969 | nth_minibuffer (EMACS_INT depth) | 969 | nth_minibuffer (EMACS_INT depth) |
| 970 | { | 970 | { |
| 971 | Lisp_Object tail = Fnthcdr (make_fixnum (depth), Vminibuffer_list); | 971 | Lisp_Object tail = Fnthcdr (make_fixnum (depth), Vminibuffer_list); |
| 972 | if (NILP (tail)) | ||
| 973 | return Qnil; | ||
| 972 | return XCAR (tail); | 974 | return XCAR (tail); |
| 973 | } | 975 | } |
| 974 | 976 | ||