Commit 6a5e47c5 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer

xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL

Avoids a crash in xf86RotatePrepare -> DamageRegister during
CreateScreenResources if rotation or another transform is configured for
any connected RandR output in xorg.conf. The generic rotation/transform
code generally can't work without the root window currently.

Closes: xorg/xserver#969
Fixes: 094f42cd "xfree86/modes: Call xf86RotateRedisplay from
                     xf86CrtcRotate"
Acked-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 57837161
......@@ -176,7 +176,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
DamagePtr damage = xf86_config->rotation_damage;
RegionPtr region;
if (!damage)
if (!damage || !pScreen->root)
return FALSE;
xf86RotatePrepare(pScreen);
region = DamageRegion(damage);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment