This reverts commit
dab02dea3411d325a5aee6cda5b581e61396ecc6.
It causes crashes of qtcreator and firefox.
Fixes: dab02de "st/dri: Fix dangling pointer to a destroyed dri_drawable"
Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
void
dri_destroy_buffer(__DRIdrawable * dPriv)
{
- struct dri_context *ctx = dri_context(dPriv->driContextPriv);
struct dri_drawable *drawable = dri_drawable(dPriv);
struct dri_screen *screen = drawable->screen;
struct st_api *stapi = screen->st_api;
/* Notify the st manager that this drawable is no longer valid */
stapi->destroy_drawable(stapi, &drawable->base);
- if (ctx && ctx->dPriv == dPriv)
- ctx->dPriv = NULL;
-
FREE(drawable);
}