Skip to content

Commit

Permalink
Fix a null reference exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender authored and abcdefg30 committed Jul 12, 2021
1 parent f1f5df3 commit cd90c70
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -19,6 +19,9 @@ public class AddFactionSuffixLogic : ChromeLogic
[ObjectCreator.UseCtor]
public AddFactionSuffixLogic(Widget widget, World world)
{
if (world.LocalPlayer == null)
return;

if (!ChromeMetrics.TryGet("FactionSuffix-" + world.LocalPlayer.Faction.InternalName, out string faction))
faction = world.LocalPlayer.Faction.InternalName;
var suffix = "-" + faction;
Expand Down

0 comments on commit cd90c70

Please sign in to comment.