From c8d4c0a25dba49d1486761438b96374672b29645 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 11 Dec 2014 16:50:39 +0900 Subject: glamor: Make glamor_destroy_textured_pixmap idempotent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For robustness against drivers which may call both glamor_(egl_)destroy_textured_pixmap and glamor_destroy_pixmap. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- glamor/glamor.c | 1 + glamor/glamor_fbo.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'glamor') diff --git a/glamor/glamor.c b/glamor/glamor.c index cbd0e02ad..d1aa1cfb0 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -226,6 +226,7 @@ glamor_destroy_textured_pixmap(PixmapPtr pixmap) glamor_egl_destroy_pixmap_image(pixmap); #endif glamor_pixmap_destroy_fbo(pixmap_priv); + glamor_set_pixmap_private(pixmap, NULL); } } } diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c index 42738268c..d2aabb21c 100644 --- a/glamor/glamor_fbo.c +++ b/glamor/glamor_fbo.c @@ -540,8 +540,6 @@ glamor_pixmap_destroy_fbo(glamor_pixmap_private *priv) if (fbo) glamor_destroy_fbo(fbo); } - - free(priv); } Bool -- cgit v1.2.3