diff options
author | Arthur Williams <taaparthur@gmail.com> | 2019-10-06 11:55:35 -0700 |
---|---|---|
committer | Arthur Williams <taaparthur@gmail.com> | 2019-10-06 12:18:13 -0700 |
commit | e693c9657f98c334e9921ca2f8ebf710497c0c6a (patch) | |
tree | accf1731a48f7b72f6403b32a752f7c4423e9ff4 /dix | |
parent | a505ecba1048048c168472e4b4a92c13f92b0613 (diff) |
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>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/devices.c b/dix/devices.c index 1b18b168e..00c453980 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -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; } /** |