]> git.eshelyaron.com Git - emacs.git/commitdiff
(delete_kboard): Handle the case that selected_frame
authorGerd Moellmann <gerd@gnu.org>
Mon, 7 May 2001 13:43:10 +0000 (13:43 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 7 May 2001 13:43:10 +0000 (13:43 +0000)
has been deleted in the course of x_connection_closed.

src/keyboard.c

index da1ce089b9dd897d54b10827fcc536cbbe987907..e447211a277fb075014dbf0385853e7d4ed6eec2 100644 (file)
@@ -10032,9 +10032,11 @@ delete_kboard (kb)
   *kbp = kb->next_kboard;
 
   /* Prevent a dangling reference to KB.  */
-  if (kb == current_kboard)
+  if (kb == current_kboard
+      && FRAMEP (selected_frame)
+      && FRAME_LIVE_P (XFRAME (selected_frame)))
     {
-      current_kboard = SELECTED_FRAME ()->kboard;
+      current_kboard = XFRAME (selected_frame)->kboard;
       if (current_kboard == kb)
        abort ();
     }