Merge remote-tracking branch 'lethosor/fix-textures-cleanup-segfault' into develop

develop
lethosor 2023-08-01 00:35:19 -04:00
commit 9f168214dd
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 1 additions and 1 deletions

@ -178,7 +178,7 @@ void Textures::cleanup() {
auto & textures = enabler->textures; auto & textures = enabler->textures;
auto &raws = textures.raws; auto &raws = textures.raws;
size_t texpos_end = g_dfhack_logo_texpos_start + g_num_dfhack_textures; size_t texpos_end = g_dfhack_logo_texpos_start + g_num_dfhack_textures - 1;
for (size_t idx = g_dfhack_logo_texpos_start; idx <= texpos_end; ++idx) { for (size_t idx = g_dfhack_logo_texpos_start; idx <= texpos_end; ++idx) {
DFSDL_FreeSurface((SDL_Surface *)raws[idx]); DFSDL_FreeSurface((SDL_Surface *)raws[idx]);
raws[idx] = NULL; raws[idx] = NULL;