mirror of https://github.com/godotengine/godot
Wait for navigation baking to finish before destruction
This commit is contained in:
parent
5860b02b63
commit
a93a2e519d
|
|
@ -372,6 +372,10 @@ NavigationRegion3D::NavigationRegion3D() {
|
|||
}
|
||||
|
||||
NavigationRegion3D::~NavigationRegion3D() {
|
||||
if (bake_thread.is_started()) {
|
||||
bake_thread.wait_to_finish();
|
||||
}
|
||||
|
||||
if (navigation_mesh.is_valid()) {
|
||||
navigation_mesh->disconnect("changed", callable_mp(this, &NavigationRegion3D::_navigation_changed));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue