From 03650f2a53fe166aa86f3f28ff2578e9f3874271 Mon Sep 17 00:00:00 2001 From: mtabachenko Date: Sat, 10 Jan 2009 14:53:01 +0000 Subject: [PATCH] fix Zelda crash :) --- desmume/src/OGLRender.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index f5a309d94..9b067fc85 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -513,6 +513,7 @@ static void OGLClose() if (txt_slot_current_size<=0)\ {\ txt_slot_current++;\ + if (txt_slot_current>3) txt_slot_current = 0;\ adr=(unsigned char *)ARM9Mem.textureSlotAddr[txt_slot_current];\ txt_slot_size=txt_slot_current_size=0x020000;\ }