gsdx: fix a crash with UserHacks_ColorDepthClearOverlap

This commit is contained in:
Gregory Hainaut 2015-07-05 14:13:24 +02:00
parent e1144d7a18
commit edc9d23566
1 changed files with 1 additions and 1 deletions

View File

@ -674,7 +674,7 @@ void GSRendererHW::Hacks::SetGameCRC(const CRC::Game& game)
bool GSRendererHW::OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) bool GSRendererHW::OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
{ {
if (m_vt.m_primclass == GS_SPRITE_CLASS && !PRIM->TME && !m_context->ZBUF.ZMSK && (m_context->FRAME.FBW >= 7)) { if ((m_vt.m_primclass == GS_SPRITE_CLASS) && !PRIM->TME && !m_context->ZBUF.ZMSK && (m_context->FRAME.FBW >= 7) && rt) {
GSVertex* v = &m_vertex.buff[0]; GSVertex* v = &m_vertex.buff[0];
//GL_INS("OI_DoubleHalfClear: psm:%x. Z:%d R:%d G:%d B:%d A:%d", m_context->FRAME.PSM, //GL_INS("OI_DoubleHalfClear: psm:%x. Z:%d R:%d G:%d B:%d A:%d", m_context->FRAME.PSM,