Revert "st/dri: Fix dangling pointer to a destroyed dri_drawable"
authorMarek Olšák <marek.olsak@amd.com>
Tue, 24 Apr 2018 04:00:20 +0000 (00:00 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 24 Apr 2018 04:00:20 +0000 (00:00 -0400)
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>
src/gallium/state_trackers/dri/dri_drawable.c

index 02328ac..e5a7537 100644 (file)
@@ -185,7 +185,6 @@ fail:
 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;
@@ -203,9 +202,6 @@ dri_destroy_buffer(__DRIdrawable * dPriv)
    /* 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);
 }