From 960a9774e30f61a532033eccf5ccfd9be97e9ea2 Mon Sep 17 00:00:00 2001 From: thelemonman Date: Sun, 13 Oct 2013 17:46:50 +0000 Subject: [PATCH] Don't segfault when trying to change the slot1 cart type in the cli frontend. --- desmume/src/cli/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/desmume/src/cli/main.cpp b/desmume/src/cli/main.cpp index f0779bbe6..e923831df 100644 --- a/desmume/src/cli/main.cpp +++ b/desmume/src/cli/main.cpp @@ -518,6 +518,13 @@ int main(int argc, char ** argv) { /* the firmware settings */ struct NDS_fw_config_data fw_config; +#ifdef GDB_STUB + NDS_Init( arm9_memio, &arm9_ctrl_iface, + arm7_memio, &arm7_ctrl_iface); +#else + NDS_Init(); +#endif + /* default the firmware settings, they may get changed later */ NDS_FillDefaultFirmwareConfigData( &fw_config); @@ -586,13 +593,6 @@ int main(int argc, char ** argv) { } #endif -#ifdef GDB_STUB - NDS_Init( arm9_memio, &arm9_ctrl_iface, - arm7_memio, &arm7_ctrl_iface); -#else - NDS_Init(); -#endif - /* Create the dummy firmware */ NDS_CreateDummyFirmware( &fw_config);