Skip to content
Permalink
Browse files

- fixed: player_t::GetGender needs to check if the CVAR exists.

This function can get called before the player's userinfo is available
  • Loading branch information...
coelckers committed Mar 13, 2019
1 parent 8dea4f9 commit 613cf15b31ffcdcd794708e20a13c4f3dcc2230a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/d_player.h
@@ -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
{

0 comments on commit 613cf15

Please sign in to comment.
You can’t perform that action at this time.