path: root/hw/xfree86
diff options
authorMichel Dänzer <>2020-01-27 17:47:10 +0100
committerMichel Dänzer <>2020-01-30 17:53:12 +0100
commit6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2 (patch)
treeea58934bc844af6e8380b97fdf24e5392ecbb10a /hw/xfree86
parent578371616e09364318c9fb2371a693d438b31b29 (diff)
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: Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate" Acked-by: Olivier Fourdan <> Reviewed-by: Adam Jackson <>
Diffstat (limited to 'hw/xfree86')
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 05944cfcb..5415ed97c 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -176,7 +176,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
DamagePtr damage = xf86_config->rotation_damage;
RegionPtr region;
- if (!damage)
+ if (!damage || !pScreen->root)
return FALSE;
region = DamageRegion(damage);