mirror of
https://github.com/encounter/SDL.git
synced 2025-06-22 14:33:33 +00:00
Fixed crash if debug text wasn't drawn during a session
This commit is contained in:
parent
8cd515c324
commit
20f51b1fd7
@ -3478,7 +3478,7 @@ void SDLTest_CleanupTextDrawing(void)
|
|||||||
struct SDLTest_CharTextureCache* cache, *next;
|
struct SDLTest_CharTextureCache* cache, *next;
|
||||||
|
|
||||||
cache = SDLTest_CharTextureCacheList;
|
cache = SDLTest_CharTextureCacheList;
|
||||||
do {
|
while (cache) {
|
||||||
for (i = 0; i < SDL_arraysize(cache->charTextureCache); ++i) {
|
for (i = 0; i < SDL_arraysize(cache->charTextureCache); ++i) {
|
||||||
if (cache->charTextureCache[i]) {
|
if (cache->charTextureCache[i]) {
|
||||||
SDL_DestroyTexture(cache->charTextureCache[i]);
|
SDL_DestroyTexture(cache->charTextureCache[i]);
|
||||||
@ -3489,7 +3489,7 @@ void SDLTest_CleanupTextDrawing(void)
|
|||||||
next = cache->next;
|
next = cache->next;
|
||||||
SDL_free(cache);
|
SDL_free(cache);
|
||||||
cache = next;
|
cache = next;
|
||||||
} while (cache);
|
}
|
||||||
|
|
||||||
SDLTest_CharTextureCacheList = NULL;
|
SDLTest_CharTextureCacheList = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user