summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <hramrach@gmail.com>2012-03-28 18:12:39 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2012-04-05 17:41:05 -0700
commitb704d9146336c3044be2be7ae38ce2c5b5a47f86 (patch)
treea4a2ac2621a8fbc03c0381c436dbb2af76026703
parent391f75e87515fcc89b8e5cd058401c4a056d9139 (diff)
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> (cherry picked from commit 55f552adb651715d2620db7248cd5b9b8187654a)
-rw-r--r--hw/xfree86/modes/xf86Rotate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 85d75573d..f9602fa47 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -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,