Skip to content

Commit 6b22bcb

Browse files
committed
1 parent 3ec959f commit 6b22bcb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

B9PartSwitch/PartSwitch/ModuleB9PartInfo.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ private void Start()
4949
SetupGUI();
5050
UpdateFields();
5151

52-
GameEvents.onEditorShipModified.Add(EditorShipModified);
52+
GameEvents.onEditorShipModified.Add(this.EditorShipModified);
53+
}
54+
55+
private void OnDestroy()
56+
{
57+
GameEvents.onEditorShipModified.Remove(this.EditorShipModified);
5358
}
5459

5560
private void EditorShipModified(ShipConstruct construct)

0 commit comments

Comments
 (0)