Add check for body_buf & properly free buffers

Also remove unused extdata dump method
This commit is contained in:
2024-06-13 18:28:04 -04:00
parent c3e09adcb2
commit 0420b23fbf
2 changed files with 8 additions and 61 deletions

View File

@@ -216,7 +216,7 @@ static Result install_theme_internal(const Entry_List_s * themes, int installmod
char * body_buf = NULL;
u32 uncompressed_size = decompress_lz_file(fsMakePath(PATH_ASCII, "/BodyCache.bin"), ArchiveThemeExt, &body_buf);
if (body_buf[5] != 1)
if (body_buf != NULL && body_buf[5] != 1)
{
installmode |= THEME_INSTALL_BODY;
body_buf[5] = 1;