Hello,

sending the patch for preventing crash on close in X server 1.12.

Thanks

Michal
From 5b09e4b79db0ff6d56e54d7d4b0c4038ac2ec824 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <hramr...@gmail.com>
Date: Mon, 26 Mar 2012 16:46:01 +0200
Subject: [PATCH] xfree86: workaround crash on close

Signed-off-by: Michal Suchanek <hramr...@gmail.com>
Reviewed-by: Jeremy Huddleston <jerem...@apple.com>
---
 hw/xfree86/modes/xf86Rotate.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index ff7000b..2a02cff 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -283,6 +283,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 */
@@ -300,12 +301,12 @@ 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,
+	    DamageUnregister (screenDrawable,
 			      xf86_config->rotation_damage);
 	    xf86_config->rotation_damage_registered = FALSE;
 	    DisableLimitedSchedulingLatency();
-- 
1.7.9.1

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to