Module: Mesa
Branch: 18.0
Commit: 6bd2fba19dad4705326c109f9ce042cb9a03789a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6bd2fba19dad4705326c109f9ce042cb9a03789a

Author: Marek Olšák <marek.ol...@amd.com>
Date:   Tue Apr 24 00:00:20 2018 -0400

Revert "st/dri: Fix dangling pointer to a destroyed dri_drawable"

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-sta...@lists.freedesktop.org>
(cherry picked from commit 4559aefb5cee5878198f8491680abe47df3e3250)

---

 src/gallium/state_trackers/dri/dri_drawable.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/gallium/state_trackers/dri/dri_drawable.c 
b/src/gallium/state_trackers/dri/dri_drawable.c
index e733712f69..a5999be574 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -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);
 }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to