Skip to content

Commit

Permalink
missing check for null
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFiler committed Feb 6, 2024
1 parent 9126fa1 commit b3e1c9c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public static void LinkCommands(Commands commands)
_commands.OnSaveSuccess -= SaveCustomNames;

_commands = commands;
if (_commands != null)
_commands.OnSaveSuccess += SaveCustomNames;
if (_commands == null) return;

_commands.OnSaveSuccess += SaveCustomNames;

LoadCustomNames(commands.Filepath);
}
Expand Down

0 comments on commit b3e1c9c

Please sign in to comment.