Fix (next-frame nil t) crash (Bug#24281)

* src/frame.c (candidate_frame): Check minibuf argument before
comparing it to zero (Bug#24281).

This was backported from master
(cherry picked from commit dc491c3df3)
This commit is contained in:
Martin Rudalics 2016-08-22 08:33:48 +02:00 committed by Eli Zaretskii
parent 3f539c0013
commit 16e62077bb

View file

@ -1308,7 +1308,7 @@ candidate_frame (Lisp_Object candidate, Lisp_Object frame, Lisp_Object minibuf)
FRAME_FOCUS_FRAME (c))) FRAME_FOCUS_FRAME (c)))
return candidate; return candidate;
} }
else if (XFASTINT (minibuf) == 0) else if (INTEGERP (minibuf) && XINT (minibuf) == 0)
{ {
if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c)) if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c))
return candidate; return candidate;