From 7589a1d97e9150b9352393d049b3cf6a2cc68086 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 25 Jan 1999 01:37:58 +0000 Subject: [PATCH] (x_set_frame_parameters): gcpro as needed. --- src/xfns.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xfns.c b/src/xfns.c index 1a76f039eff..b1b453854ec 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -760,6 +760,8 @@ x_set_frame_parameters (f, alist) int left_no_change = 0, top_no_change = 0; int icon_left_no_change = 0, icon_top_no_change = 0; + struct gcpro gcpro1, gcpro2; + i = 0; for (tail = alist; CONSP (tail); tail = Fcdr (tail)) i++; @@ -779,7 +781,15 @@ x_set_frame_parameters (f, alist) values[i] = Fcdr (elt); i++; } + /* TAIL and ALIST are not used again below here. */ + alist = tail = Qnil; + + GCPRO2 (*parms, *values); + gcpro1.nvars = i; + gcpro2.nvars = i; + /* There is no need to gcpro LEFT, TOP, ICON_LEFT, or ICON_TOP, + because their values appear in VALUES and strings are not valid. */ top = left = Qunbound; icon_left = icon_top = Qunbound; @@ -951,6 +961,8 @@ x_set_frame_parameters (f, alist) && ! (icon_left_no_change && icon_top_no_change)) x_wm_set_icon_position (f, XINT (icon_left), XINT (icon_top)); } + + UNGCPRO; } /* Store the screen positions of frame F into XPTR and YPTR. -- 2.39.2