FernetMenta/xbmc — comment on commit 2f8921af82dcaf407e2d68954dba7f86e5a1d7c5
File:  line 0
By fritsch:

If I see this right, it just changes the order of freeing the resources.
Did DestroySurface return BadSurface if you deleted the texture before with glDeleteTexture?