Merge pull request #76004 from mashumafi/wait-nav-region-thread

This commit is contained in:
Max Hilbrunner 2023-05-05 13:50:09 +02:00 committed by GitHub
commit 03dfae4208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,6 +374,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));
}