]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix (next-frame nil t) crash (Bug#24281)
authorMartin Rudalics <rudalics@gmx.at>
Mon, 22 Aug 2016 06:33:48 +0000 (08:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 23 Sep 2016 14:05:29 +0000 (17:05 +0300)
* src/frame.c (candidate_frame): Check minibuf argument before
comparing it to zero (Bug#24281).

This was backported from master
(cherry picked from commit dc491c3df305a73908fe8de20b7c428a5b38c846)

src/frame.c

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