mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed crash on startup inside userinfo_t::GetGender()
This function is required for localization handling but when it's called userinfo_t may not be fully initialized yet https://forum.zdoom.org/viewtopic.php?t=63959
This commit is contained in:
parent
50ebca20bb
commit
c0d843b596
1 changed files with 2 additions and 2 deletions
|
@ -250,8 +250,8 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
|||
}
|
||||
int GetGender() const
|
||||
{
|
||||
auto cvar = static_cast<FIntCVar *>(*CheckKey(NAME_Gender));
|
||||
return cvar? *cvar : 0;
|
||||
auto cvar = CheckKey(NAME_Gender);
|
||||
return cvar ? *static_cast<FIntCVar *>(*cvar) : 0;
|
||||
}
|
||||
bool GetNoAutostartMap() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue