mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-13 10:11:43 +00:00
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 <taaparthur@gmail.com>
(cherry picked from commit e693c9657f)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user