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:
Keith Packard 2010-12-06 20:38:14 -08:00
parent 0d01b66df9
commit 435361bd73

View File

@ -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;
}