From b95b076bed0f47fb71073e604d7cd516a052fc7c Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 5 Nov 2023 18:44:46 +0000 Subject: [PATCH] Tutorial course select: Fix returning to the menu behaviour --- src/menus/transient/level-select.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/menus/transient/level-select.c b/src/menus/transient/level-select.c index 4bd28d7cf..bfaa7fa4a 100644 --- a/src/menus/transient/level-select.c +++ b/src/menus/transient/level-select.c @@ -435,12 +435,17 @@ boolean M_LevelListFromGametype(INT16 gt) // Okay, just a list of maps then. - boolean invalidatedcursor = ( - levellist.levelsearch.cup != NULL - || levellist.levelsearch.tutorial != (gt == GT_TUTORIAL) - ); + boolean invalidatedcursor = false; + + if (gt != -1) + { + invalidatedcursor = ( + levellist.levelsearch.cup != NULL + || levellist.levelsearch.tutorial != (gt == GT_TUTORIAL) + ); + levellist.levelsearch.tutorial = (gt == GT_TUTORIAL); + } levellist.levelsearch.cup = NULL; - levellist.levelsearch.tutorial = (gt == GT_TUTORIAL); UINT16 test = M_GetFirstLevelInList(&temp, &levellist.levelsearch);