mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-26 00:40:05 +01:00
sync: syncObject may be None in SyncInitTrigger
And often is, especially when called from ProcSyncCreateAlarm. Crashing in this case seems unwise. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
0d01b66df9
commit
435361bd73
1 changed files with 2 additions and 2 deletions
|
|
@ -296,7 +296,7 @@ SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XID syncObject,
|
|||
|
||||
/* if system counter, ask it what the current value is */
|
||||
|
||||
if (SYNC_COUNTER == pSync->type)
|
||||
if (pSync && SYNC_COUNTER == pSync->type)
|
||||
{
|
||||
pCounter = (SyncCounter *)pSync;
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XID syncObject,
|
|||
if (changes & XSyncCATestType)
|
||||
{
|
||||
|
||||
if (SYNC_FENCE == pSync->type)
|
||||
if (pSync && SYNC_FENCE == pSync->type)
|
||||
{
|
||||
pTrigger->CheckTrigger = SyncCheckTriggerFence;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue