menu: fix memory leak
The start game sequence didn't properly clean up when cancelling out of a character selection menu if no difficulty selection was presented (e.g. spell cards)
This commit is contained in:
parent
183ae50543
commit
42e88e89f8
1 changed files with 5 additions and 0 deletions
|
@ -115,6 +115,11 @@ static void start_game_do_enter_stage(CallChainResult ccr) {
|
|||
if(prev_menu && prev_menu->state == MS_Dead) {
|
||||
assert(prev_menu == ctx->char_menu);
|
||||
ctx->char_menu = NULL;
|
||||
|
||||
if(!ctx->diff_menu) {
|
||||
start_game_do_cleanup(ccr);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue