Commit ed33772a authored by Michal Suchánek's avatar Michal Suchánek Committed by Jeremy Huddleston Sequoia

xfree86: workaround crash on close

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653Signed-off-by: Michal Suchánek's avatarMichal Suchanek <hramrach@gmail.com>
Reviewed-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <jeremyhu@apple.com>
Tested-by: default avatarKnut Petersen <Knut_Petersen@t-online.de>
(cherry picked from commit fa6dddc6)
parent e4dbdee3
......@@ -290,14 +290,19 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
* Clean up damage structures when no crtcs are rotated
*/
if (xf86_config->rotation_damage) {
DrawablePtr screenDrawable = NULL;
if (pScreen && pScreen->root)
screenDrawable = &pScreen->root->drawable;
/* Free damage structure */
if (xf86_config->rotation_damage_registered) {
DamageUnregister(&pScreen->root->drawable,
xf86_config->rotation_damage);
if (screenDrawable)
DamageUnregister(screenDrawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = FALSE;
DisableLimitedSchedulingLatency();
}
DamageDestroy(xf86_config->rotation_damage);
if (screenDrawable)
DamageDestroy(xf86_config->rotation_damage);
xf86_config->rotation_damage = NULL;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment