Commit 3c48bd50 authored by Arthur Williams's avatar Arthur Williams

dix: Check for NULL spriteInfo in GetPairedDevice

There is a race when reseting the XServer that causes spriteInfo to be
NULL in GetPairedDevice resulting a segfault and subsequent crash. The
problem was noticed when opening a connection, creating master devices,
destroying master devices and closing the connection during testing.
Signed-off-by: Arthur Williams's avatarArthur Williams <taaparthur@gmail.com>


(cherry picked from commit e693c965)
parent 1610ef1d
Pipeline #118341 passed with stages
in 7 minutes and 4 seconds
......@@ -2656,7 +2656,7 @@ GetPairedDevice(DeviceIntPtr dev)
if (!IsMaster(dev) && !IsFloating(dev))
dev = GetMaster(dev, MASTER_ATTACHED);
return dev->spriteInfo->paired;
return dev->spriteInfo? dev->spriteInfo->paired: NULL;
}
/**
......
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