From c9bf4e7f4320363c8cea87a60efc31d8dfd18dd9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 11 May 2021 16:37:37 +0300 Subject: [PATCH] Fix assertions in nth_minibuffer * src/minibuf.c (nth_minibuffer): Avoid assertion violation when DEPTHth minibuffer doesn't exist. (Bug#48337) --- src/minibuf.c | 2 ++ 1 file changed, 2 insertions(+) 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 nth_minibuffer (EMACS_INT depth) { Lisp_Object tail = Fnthcdr (make_fixnum (depth), Vminibuffer_list); + if (NILP (tail)) + return Qnil; return XCAR (tail); } -- 2.39.2