diff options
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r-- | src/glx/glxext.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 445592f1a8a..65aacc5887d 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -268,7 +268,6 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv) psc->driver_configs = NULL; } if (psc->driScreen) { - __glxHashDestroy(psc->drawHash); psc->driScreen->destroyScreen(psc); psc->driScreen = NULL; } else { @@ -302,6 +301,8 @@ __glXFreeDisplayPrivate(XExtData * extension) priv->serverGLXversion = 0x0; /* to protect against double free's */ } + __glxHashDestroy(priv->drawHash); + #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /* Free the direct rendering per display data */ if (priv->driswDisplay) @@ -758,10 +759,7 @@ glx_screen_init(__GLXscreenConfigs *psc, psc->ext_list_first_time = GL_TRUE; psc->scr = screen; psc->dpy = priv->dpy; - psc->drawHash = __glxHashCreate(); psc->display = priv; - if (psc->drawHash == NULL) - return GL_FALSE; getVisualConfigs(psc, priv, screen); getFBConfigs(psc, priv, screen); @@ -815,11 +813,6 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv) psc = (*priv->driswDisplay->createScreen) (i, priv); if (psc == NULL) psc = createIndirectScreen (i, priv); - - if (psc == NULL) { - __glxHashDestroy(psc->drawHash); - psc->drawHash = NULL; - } #endif priv->screenConfigs[i] = psc; } @@ -899,6 +892,8 @@ __glXInitialize(Display * dpy) glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL); glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL); + dpyPriv->drawHash = __glxHashCreate(); + /* ** Initialize the direct rendering per display data and functions. ** Note: This _must_ be done before calling any other DRI routines |