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.
This commit is contained in:
George Staplin 2009-03-04 02:03:52 -07:00
parent bede83eb19
commit aa0a57996f

View File

@ -858,8 +858,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;