fix bug for deleteTexture
Merge pull request #7049 from dabingnn/v3_fixDeleteTexture

fix bug for deleteTexture