Skip to content

Commit

Permalink
fix: Missing disposal of KD tree nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed Mar 19, 2023
1 parent 28d1942 commit 1440364
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VisualPinball.Unity/VisualPinball.Unity/Game/WirePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private void HandleKeyInput(object obj, InputActionChange change)
var action = (InputAction)obj;
if (_keyWireAssignments != null && _keyWireAssignments.ContainsKey(action.name)) {
foreach (var wireConfig in _keyWireAssignments[action.name]) {
if (!_wireDevices.ContainsKey(wireConfig.Device)) {
if (wireConfig.Device == null || !_wireDevices.ContainsKey(wireConfig.Device)) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void AddNodes(KdNode nodeA, KdNode nodeB, out int nodeIndexA, out int nod
public void Dispose()
{
_bounds.Dispose();
_nodes.Dispose();
OrgIdx.Dispose();
Indices.Dispose();
}
Expand Down

0 comments on commit 1440364

Please sign in to comment.