[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#608365: xserver-xorg-core: attached patch should fix the crash on close



Package: xserver-xorg-core
Severity: normal

Hello

Attaching a patch which fixed the issue shortly after it was introduced.

It does not seem applied upstream so either there is a different fix or
this is still broken.

My X server crashes way earlier so can't tell.

Thanks

Michal
Index: xserver/hw/xfree86/modes/xf86Rotate.c
===================================================================
--- xserver.orig/hw/xfree86/modes/xf86Rotate.c	2011-10-11 13:24:11.000000000 +0200
+++ xserver/hw/xfree86/modes/xf86Rotate.c	2011-10-11 14:31:32.000000000 +0200
@@ -283,6 +283,7 @@
     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 @@
     /*
      * 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();

Reply to: