From ec95a9c829b8e37529aa828c05fbaabc45cffe42 Mon Sep 17 00:00:00 2001 From: George Staplin Date: Wed, 4 Mar 2009 02:03:52 -0700 Subject: [PATCH] XQuartz: Add diagnostic error checking to xp_destroy_surface. This occurred to me in hindsight after the last commit. If the original developer had done this, we would have noticed the problem sooner. (cherry picked from commit aa0a57996f3e7d16238f69976958c2526821388b) --- hw/xquartz/xpr/dri.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index 4f9c97c04..8bae6b009 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -728,8 +728,13 @@ DRISurfaceNotify(xp_surface_id id, int kind) if (kind == AppleDRISurfaceNotifyDestroyed) { - xp_destroy_surface(pDRIDrawablePriv->sid); + xp_error error; + error = xp_destroy_surface(pDRIDrawablePriv->sid); + + if(error) + ErrorF("%s: xp_destroy_surface failed: %d\n", __func__, error); + /* Guard against reuse, even though we are freeing after this. */ pDRIDrawablePriv->sid = 0;