mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- fixed: player_t::GetGender needs to check if the CVAR exists.
This function can get called before the player's userinfo is available
This commit is contained in:
parent
8dea4f9523
commit
613cf15b31
1 changed files with 2 additions and 1 deletions
|
@ -250,7 +250,8 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
|||
}
|
||||
int GetGender() const
|
||||
{
|
||||
return *static_cast<FIntCVar *>(*CheckKey(NAME_Gender));
|
||||
auto cvar = static_cast<FIntCVar *>(*CheckKey(NAME_Gender));
|
||||
return cvar? *cvar : 0;
|
||||
}
|
||||
bool GetNoAutostartMap() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue