TextureCache: Don't proceed if we get a crazy bufw for some reason, risk of crashing.

This commit is contained in:
Henrik Rydgård 2015-10-14 22:13:50 +02:00
parent 71398cbc34
commit 6c08e00e8c

View file

@ -1411,6 +1411,8 @@ void TextureCache::SetTexture(bool force) {
if ((bufw == 0 || (gstate.texbufwidth[0] & 0xf800) != 0) && texaddr >= PSP_GetKernelMemoryEnd()) {
ERROR_LOG_REPORT(G3D, "Texture with unexpected bufw (full=%d)", gstate.texbufwidth[0] & 0xffff);
// Proceeding here can cause a crash.
return;
}
// We have to decode it, let's setup the cache entry first.