Skip to content

Commit

Permalink
Fix a GameEvents leak
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Jun 10, 2024
1 parent c52a34e commit 9fde2fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RealAntennasProject/ModuleRealAntenna.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public override void OnSave(ConfigNode node)
RAAntenna.Target?.Save(node);
}

public void OnDestroy()
{
GameEvents.OnGameSettingsApplied.Remove(ApplyGameSettings);
}

public void Configure(ConfigNode node)
{
RAAntenna.Name = part.partInfo?.title ?? part.name;
Expand Down

0 comments on commit 9fde2fd

Please sign in to comment.