changeset 71577:ae1e5666e49f

(Fx_create_frame): Move unwind_create_frame setup down.
author Richard M. Stallman <rms@gnu.org>
date Mon, 03 Jul 2006 15:42:48 +0000
parents b8678c550150
children a30f70d64256
files src/xfns.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Mon Jul 03 15:42:10 2006 +0000
+++ b/src/xfns.c	Mon Jul 03 15:42:48 2006 +0000
@@ -3075,7 +3075,6 @@
   f->output_data.x->scroll_bar_top_shadow_pixel = -1;
   f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
 #endif /* USE_TOOLKIT_SCROLL_BARS */
-  record_unwind_protect (unwind_create_frame, frame);
 
   f->icon_name
     = x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title",
@@ -3084,6 +3083,9 @@
     f->icon_name = Qnil;
 
   FRAME_X_DISPLAY_INFO (f) = dpyinfo;
+
+  /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe.  */
+  record_unwind_protect (unwind_create_frame, frame);
 #if GLYPH_DEBUG
   image_cache_refcount = FRAME_X_IMAGE_CACHE (f)->refcount;
   dpyinfo_refcount = dpyinfo->reference_count;