GSDX: Avoid crash when TBW == 0

This commit is contained in:
refractionpcsx2 2016-04-28 21:36:21 +01:00
parent 04a578495f
commit 0aa8fe0f20
1 changed files with 1 additions and 1 deletions

View File

@ -435,7 +435,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int
// From a performance point of view, it might cost a little on big upscaling
// but normally few RT are miss so it must remain reasonable.
if (s_IS_OPENGL) {
if (m_preload_frame) {
if (m_preload_frame && TEX0.TBW > 0) {
GL_INS("Preloading the RT DATA");
// RT doesn't have height but if we use a too big value, we will read outside of the GS memory.
int page0 = TEX0.TBP0 >> 5;