Subject: Re: bug#23369: 25.0.93; CANNOT_DUMP build fails if resizing terminal during startup in tty mode

From: Glenn Morris <[email-masked]>
Date: Tue, 26 Apr 2016 20:53:28 -0400

I found this easy to reproduce but hard to debug, but it seems like
making window.el's internal--before-save-selected-window check
(featurep 'frame) before it tries to call frames-on-display-list
fixes it for me.

(Prescient comment in http://debbugs.gnu.org/22975#73 ?)

*** a/lisp/window.el
--- b/lisp/window.el
***************
*** 30,35 ****
--- 30,36 ----
  
  (defun internal--before-save-selected-window ()
    (cons (selected-window)
+         (if (featurep 'frame)
              ;; We save and restore all frames' selected windows, because
              ;; `select-window' can change the frame-selected-window of
              ;; whatever frame that window is in.  Each text terminal's
***************
*** 47,53 ****
                               (push (cons f (frame-selected-window f))
                                     alist))
                             alist))
!                        (terminal-list)))))
  
  (defun internal--after-save-selected-window (state)
    (dolist (elt (cdr state))
--- 48,54 ----
                                   (push (cons f (frame-selected-window f))
                                         alist))
                                 alist))
!                            (terminal-list))))))
  
  (defun internal--after-save-selected-window (state)
    (dolist (elt (cdr state))