Skip to content

Commit

Permalink
Merge pull request #570 from krzychu124/null-reference-onEnabled-fix
Browse files Browse the repository at this point in the history
Null reference OnEnable - hotfix
  • Loading branch information
krzychu124 committed Nov 23, 2019
2 parents ec41c68 + c3f0126 commit b4cb705
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TLM/TLM/UI/TrafficManagerTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ public void SetToolMode(ToolMode mode) {

// Overridden to disable base class behavior
protected override void OnEnable() {
Log._Debug("TrafficManagerTool.OnEnable(): Performing cleanup");
foreach (KeyValuePair<ToolMode, SubTool> e in subTools_) {
e.Value.Cleanup();
if (subTools_ != null) {
Log._Debug("TrafficManagerTool.OnEnable(): Performing cleanup");
foreach (KeyValuePair<ToolMode, SubTool> e in subTools_) {
e.Value.Cleanup();
}
}
}

Expand Down

0 comments on commit b4cb705

Please sign in to comment.