xfree86: workaround crash on close
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek <hramrach@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
641a1b9363
commit
55f552adb6
|
@ -272,6 +272,7 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
|
|||
ScrnInfoPtr pScrn = crtc->scrn;
|
||||
ScreenPtr pScreen = pScrn->pScreen;
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
DrawablePtr screenDrawable = &pScreen->root->drawable;
|
||||
int c;
|
||||
|
||||
/* Free memory from rotation */
|
||||
|
@ -289,7 +290,7 @@ xf86RotateDestroy(xf86CrtcPtr crtc)
|
|||
/*
|
||||
* Clean up damage structures when no crtcs are rotated
|
||||
*/
|
||||
if (xf86_config->rotation_damage) {
|
||||
if (screenDrawable && xf86_config->rotation_damage) {
|
||||
/* Free damage structure */
|
||||
if (xf86_config->rotation_damage_registered) {
|
||||
DamageUnregister(&pScreen->root->drawable,
|
||||
|
|
Loading…
Reference in New Issue