Skip to content

Commit

Permalink
Fix validate_spatial method
Browse files Browse the repository at this point in the history
  • Loading branch information
Elevator89 committed Apr 8, 2020
1 parent 9a1e00b commit 79e1ba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sceneObjects/DMeshSO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void on_mesh_changed(bool bInvalidateSpatial = true, bool bInvalidateDecomp = tr

void validate_spatial()
{
if ( enable_spatial && spatial == null ) {
if (enable_spatial && (spatial == null || !spatial.IsValid)) {
spatial = new DMeshAABBTree3(mesh);
spatial.Build();
}
Expand Down

0 comments on commit 79e1ba9

Please sign in to comment.