Fixed command-line launch segfault

custom_menu_destroy() was causing a segfault when launching the game via
command-line parameters
This commit is contained in:
MysterD 2020-10-17 23:04:59 -07:00
parent 2519c59958
commit eea5ebb94b
3 changed files with 2 additions and 6 deletions

View file

@ -30,11 +30,11 @@ fi
# debug on client #
###################
$FILE --server 27015 --configfile sm64config_server.txt &
$FILE --server 27015 --configfile sm64config_server.txt &
# debug if cgdb exists
if ! [ -x "$(command -v cgdb)" ]; then
$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
$FILE --client 127.0.0.1 27015 --configfile sm64config_client.txt &
else
winpty cgdb $FILE -ex 'break debug_breakpoint_here' -ex 'run --client 127.0.0.1 27015 --configfile sm64config_client.txt' -ex 'quit'
fi

View file

@ -295,7 +295,6 @@ void custom_menu_loop(void) {
if (sGotoGame) {
sSelectedFileNum = sGotoGame;
custom_menu_close_system();
custom_menu_destroy();
}
// force-start the load when command-line server hosting

View file

@ -97,9 +97,6 @@ void custom_menu_system_init(void) {
void custom_menu_destroy(void) {
// TODO: clean up all of the calloc()'d memory
sHead = NULL;
sCurrentMenu = NULL;
sLastMenu = NULL;
}
void custom_menu_system_loop(void) {