summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@guitar.keithp.com>2007-03-23 00:59:11 -0700
committerKeith Packard <keithp@guitar.keithp.com>2007-03-23 00:59:11 -0700
commit492c768065f49306a2194a88edf96b85de0ff4ff (patch)
tree51419e70cbe00a1ed17684f05905896b887273cc
parent16f4c0c1750824f2e5a001cef82a4122a7a2beb0 (diff)
Clean up xf86CrtcRec and xf86OutputRec objects at CloseScreen.
Erase pointers to structures which are freed at server reset time.
-rw-r--r--hw/xfree86/modes/xf86Crtc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index a875cdf39..fad0752eb 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -573,11 +573,25 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
{
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+ int o, c;
screen->CloseScreen = config->CloseScreen;
xf86RotateCloseScreen (screen);
+ for (o = 0; o < config->num_output; o++)
+ {
+ xf86OutputPtr output = config->output[o];
+
+ output->crtc = NULL;
+ output->randr_output = NULL;
+ }
+ for (c = 0; c < config->num_crtc; c++)
+ {
+ xf86CrtcPtr crtc = config->crtc[c];
+
+ crtc->randr_crtc = NULL;
+ }
return screen->CloseScreen (index, screen);
}