changeset 37603:df85a76987bb

(delete_kboard): Handle the case that selected_frame has been deleted in the course of x_connection_closed.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 07 May 2001 13:43:10 +0000
parents cf908fe10fe5
children bd93cba9ef3e
files src/keyboard.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Mon May 07 11:27:36 2001 +0000
+++ b/src/keyboard.c	Mon May 07 13:43:10 2001 +0000
@@ -10032,9 +10032,11 @@
   *kbp = kb->next_kboard;
 
   /* Prevent a dangling reference to KB.  */
-  if (kb == current_kboard)
-    {
-      current_kboard = SELECTED_FRAME ()->kboard;
+  if (kb == current_kboard
+      && FRAMEP (selected_frame)
+      && FRAME_LIVE_P (XFRAME (selected_frame)))
+    {
+      current_kboard = XFRAME (selected_frame)->kboard;
       if (current_kboard == kb)
 	abort ();
     }