From 3b604c56aa89d566ed18c2cf42ee6311e0ff7585 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 23 Nov 2018 08:09:19 +0100 Subject: [PATCH xf86-video-vmware] vmwgfx: Clear the randr_outputs in close_screen In close_screen, these pointers are invalid since the objects they point to has already been taken down with the screen resources. A call into the xf86Crtc subsystem might reference them. So as an ugly workaround, clear them early close_screen Signed-off-by: Thomas Hellstrom --- vmwgfx/vmwgfx_driver.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c index 665f620..cd5c0d8 100644 --- a/vmwgfx/vmwgfx_driver.c +++ b/vmwgfx/vmwgfx_driver.c @@ -1314,6 +1314,14 @@ drv_close_screen(CLOSE_SCREEN_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + unsigned int o = 0; + + for (o = 0; o < config->num_output; ++o) { + xf86OutputPtr output = config->output[o]; + + output->randr_output = NULL; + } if (ms->cursor) { FreeCursor(ms->cursor, None); -- 2.19.1