adding guard for the callback condition
Merge pull request #6869 from visiblelight/texturecache

adding guard for the callback condition in `TextureCache::addImageAsyncCallBack`