Skip to content

Commit

Permalink
Fixed nullreference in stats_evaluate command.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidF-Dev committed Oct 30, 2021
1 parent 2e89762 commit e89e21a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Runtime/DevConsoleMono.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,14 @@ void logChildren(GameObject obj, int tabAmount)
return;
}

RunCommand($"cs_evaluate {_stats[name]}");
try
{
DevConsole.LogVariable(name, _stats[name].GetResult(_monoEvaluator) ?? "NULL");
}
catch (Exception e)
{
DevConsole.LogException(e);
}
}
));

Expand Down

0 comments on commit e89e21a

Please sign in to comment.