diff options
Diffstat (limited to 'xorg-server/hw/xfree86/dri2')
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 17 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2ext.c | 3 |
2 files changed, 17 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index a97508d21..0d613be8e 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -816,7 +816,8 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) /* If we're currently waiting for a swap on this drawable, reset * the request and suspend the client. We only support one * blocked client per drawable. */ - if ((pPriv->swapsPending) && + if (pPriv && + pPriv->swapsPending && pPriv->blockedClient == NULL) { ResetCurrentRequest(client); client->sequence--; @@ -1234,14 +1235,24 @@ DRI2CloseScreen(ScreenPtr pScreen) } extern ExtensionModule dri2ExtensionModule; +extern Bool DRI2ModuleSetup(void); + +/* Called by InitExtensions() */ +Bool +DRI2ModuleSetup(void) +{ + dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable"); + if (!dri2DrawableRes) + return FALSE; + + return TRUE; +} static pointer DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; - dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable"); - if (!setupDone) { setupDone = TRUE; diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index 934abf6de..e612cf051 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -50,6 +50,7 @@ #include "xf86Module.h" static ExtensionEntry *dri2Extension; +extern Bool DRI2ModuleSetup(void); static Bool validDrawable(ClientPtr client, XID drawable, Mask access_mode, @@ -634,6 +635,8 @@ DRI2ExtensionInit(void) StandardMinorOpcode); DRI2EventBase = dri2Extension->eventBase; + + DRI2ModuleSetup(); } extern Bool noDRI2Extension; |