Skip to content

Commit

Permalink
Fix NullReferenceException with chat command handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lukespragg committed Nov 9, 2020
1 parent 2e1e4d2 commit 087d85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HurtworldHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ private object IOnCommand(string arg, PlayerSession session)
}

// Is this a valid console command?
if (Covalence.CommandSystem.HandleConsoleMessage(session != null ? session.IPlayer : Covalence.CommandSystem.consolePlayer, arg) || (bool)cmdlib.HandleConsoleCommand(command, args))
if (Covalence.CommandSystem.HandleConsoleMessage(session != null ? session.IPlayer : Covalence.CommandSystem.consolePlayer, arg))
{
return true;
}

return null;
return cmdlib.HandleConsoleCommand(command, args);
}

#endregion Server Hooks
Expand Down

0 comments on commit 087d85e

Please sign in to comment.