Skip to content

Commit

Permalink
Fix /autorankcheck with no name causing NullReference (Thanks 123DMWM)
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Nov 15, 2017
1 parent 0a79f4c commit e09007a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fCraft/Commands/MaintenanceCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,11 @@ static void SaveHandler(Player player, CommandReader cmd)

static void AutoRankCheckHandler( Player player, CommandReader cmd ) {
string name = cmd.Next();
if( name == null ) {
CdAutoRankCheck.PrintUsage(player);
return;
}

PlayerInfo info = PlayerDB.FindPlayerInfoOrPrintMatches( player, name, SearchOptions.IncludeSelf );
if( info == null ) return;

Expand Down

0 comments on commit e09007a

Please sign in to comment.