diff options
Diffstat (limited to 'xorg-server/miext/sync')
-rw-r--r-- | xorg-server/miext/sync/misync.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/xorg-server/miext/sync/misync.c b/xorg-server/miext/sync/misync.c index d24921a18..b6914d18d 100644 --- a/xorg-server/miext/sync/misync.c +++ b/xorg-server/miext/sync/misync.c @@ -182,20 +182,21 @@ miSyncSetup(ScreenPtr pScreen) &miSyncScreenDestroyFence }; - if (dixPrivateKeyRegistered(syncScreenPrivateKey)) - return TRUE; - - if (!dixRegisterPrivateKey(syncScreenPrivateKey, PRIVATE_SCREEN, - sizeof(SyncScreenPrivRec))) - return FALSE; + if (!dixPrivateKeyRegistered(syncScreenPrivateKey)) { + if (!dixRegisterPrivateKey(syncScreenPrivateKey, PRIVATE_SCREEN, + sizeof(SyncScreenPrivRec))) + return FALSE; + } pScreenPriv = SYNC_SCREEN_PRIV(pScreen); - pScreenPriv->funcs = miSyncScreenFuncs; + if (pScreenPriv->funcs.CreateFence) { + pScreenPriv->funcs = miSyncScreenFuncs; - /* Wrap CloseScreen to clean up */ - pScreenPriv->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = SyncCloseScreen; + /* Wrap CloseScreen to clean up */ + pScreenPriv->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = SyncCloseScreen; + } return TRUE; } |