Merge pull request #1321 from PCSX2/gsdx-preloadcrash

GSDX: Avoid crash when TBW == 0 - Preload data frame
This commit is contained in:
Gregory Hainaut 2016-04-28 23:06:29 +02:00
commit 5e5069423b
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;