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();