Merge branch 'fix-profile-card-quick-confirm' into 'master'

Fix crash if navigating profiles menu too quickly

See merge request KartKrew/Kart!939
This commit is contained in:
Oni 2023-02-19 00:09:58 +00:00
commit cdf19e8c79

View file

@ -123,6 +123,12 @@ void M_HandleProfileSelect(INT32 ch)
boolean creatable = (maxp < MAXPROFILES); boolean creatable = (maxp < MAXPROFILES);
(void) ch; (void) ch;
if (menutransition.tics == 0 && optionsmenu.resetprofile)
{
optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.'
optionsmenu.resetprofile = false;
}
if (!creatable) if (!creatable)
{ {
maxp = MAXPROFILES; maxp = MAXPROFILES;
@ -215,10 +221,4 @@ void M_HandleProfileSelect(INT32 ch)
M_GoBack(0); M_GoBack(0);
M_SetMenuDelay(pid); M_SetMenuDelay(pid);
} }
if (menutransition.tics == 0 && optionsmenu.resetprofile)
{
optionsmenu.profile = NULL; // Make sure to reset that when transitions are done.'
optionsmenu.resetprofile = false;
}
} }