diff options
author | George Staplin <gstaplin@apple.com> | 2009-03-04 02:03:52 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-07-19 23:11:58 -0700 |
commit | 1d8bbdc3b81cc002b3d9ce4ce5746807e7b1c681 (patch) | |
tree | ac76f376ffe0c6a27c0679f926763c0f040aebc4 | |
parent | d0bb22ed78cccbd73841b83ebed80ad286ee6e1d (diff) |
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)
(cherry picked from commit ec95a9c829b8e37529aa828c05fbaabc45cffe42)
-rw-r--r-- | hw/xquartz/xpr/dri.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index edc1d248e..3f618de70 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -733,8 +733,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; |