diff src/frame.c @ 1313:671b65f2b075

[xemacs-hg @ 2003-02-20 01:12:25 by ben] patch for crashes when deleting frames eval.c: Don't check_quit() unless we're unbinding a real Lisp `unwind-protect' since check_quit() does lots of weird things and not all callers are prepared for it. frame.c: Make absolutely sure there is no quit checking while we are in a "critical section" during frame deletion.
author ben
date Thu, 20 Feb 2003 01:12:26 +0000
parents e22b0213b713
children b531bf8658e9
line wrap: on
line diff
--- a/src/frame.c	Wed Feb 19 22:52:37 2003 +0000
+++ b/src/frame.c	Thu Feb 20 01:12:26 2003 +0000
@@ -1459,6 +1459,7 @@
   Lisp_Object device;
   Lisp_Object console;
   struct gcpro gcpro1;
+  int depth;
 
   /* OK to delete an already deleted frame. */
   if (!FRAME_LIVE_P (f))
@@ -1682,6 +1683,10 @@
 
   /* After this point, no errors must be allowed to occur. */
 
+  /* Checking for QUIT can run all sorts of weird code and may be deadly
+     so don't let it happen. */
+  depth = begin_dont_check_for_quit ();
+
 #ifdef HAVE_MENUBARS
   free_frame_menubars (f);
 #endif
@@ -1822,6 +1827,8 @@
 
   note_object_deleted (frame);
 
+  unbind_to (depth);
+
   UNGCPRO;
 }