aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-10 12:19:10 +0000
committerGerd Moellmann2001-07-10 12:19:10 +0000
commitcefecbcf1d9e2c5e48c4d6dd7b69841855a6684c (patch)
tree3267e84b52a46eab8780daa6c8d008eecd1fcf67
parentbbac569994ad7c0bf36e573730f3f77cd7183b77 (diff)
downloademacs-cefecbcf1d9e2c5e48c4d6dd7b69841855a6684c.tar.gz
emacs-cefecbcf1d9e2c5e48c4d6dd7b69841855a6684c.zip
(Fx_create_frame): Initialize frame colors to -1,
for the case that x_decode_colors signals an error.
-rw-r--r--src/xfns.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 1f4fb43dda8..0d66c03e235 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4182,6 +4182,16 @@ This function is an internal primitive--use `make-frame' instead.")
4182 { 4182 {
4183 Lisp_Object black; 4183 Lisp_Object black;
4184 struct gcpro gcpro1; 4184 struct gcpro gcpro1;
4185
4186 /* Function x_decode_color can signal an error. Make
4187 sure to initialize color slots so that we won't try
4188 to free colors we haven't allocated. */
4189 f->output_data.x->foreground_pixel = -1;
4190 f->output_data.x->background_pixel = -1;
4191 f->output_data.x->cursor_pixel = -1;
4192 f->output_data.x->cursor_foreground_pixel = -1;
4193 f->output_data.x->border_pixel = -1;
4194 f->output_data.x->mouse_pixel = -1;
4185 4195
4186 black = build_string ("black"); 4196 black = build_string ("black");
4187 GCPRO1 (black); 4197 GCPRO1 (black);