Skip to content

Commit

Permalink
thcrap_configure: fix a crash when the repo list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
brliron committed Feb 29, 2024
1 parent cfde686 commit 226afd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thcrap_configure/src/configure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ int TH_CDECL win32_utf8_main(int argc, const char *argv[])
size_t cur_dir_len = GetCurrentDirectory(0, NULL) + 1;
VLA(char, cur_dir, cur_dir_len);
json_t *games = NULL;
games_js_entry *gamesArray = nullptr;

std::string run_cfg_fn;
std::string run_cfg_fn_js;
Expand Down Expand Up @@ -333,7 +334,6 @@ int TH_CDECL win32_utf8_main(int argc, const char *argv[])
goto end;
}

games_js_entry *gamesArray = nullptr;
if (console_ask_yn(_A("Create shortcuts? (required for first run)")) != 'n') {
gamesArray = games_js_to_array(games);
if (CreateShortcuts(run_cfg_fn.c_str(), gamesArray, SHDESTINATION_THCRAP_DIR, SHTYPE_SHORTCUT) != 0) {
Expand Down

0 comments on commit 226afd8

Please sign in to comment.