Merge pull request #100406 from smix8/gridmap_edge_debug

Fix GridMap freeing edge connection debug mesh too early
This commit is contained in:
Rémi Verschelde 2024-12-17 23:00:07 +01:00
commit 3dd60ba82f
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -850,7 +850,7 @@ void GridMap::_octant_exit_world(const OctantKey &p_key) {
g.navigation_debug_edge_connections_instance = RID();
}
if (g.navigation_debug_edge_connections_mesh.is_valid()) {
RenderingServer::get_singleton()->free(g.navigation_debug_edge_connections_mesh->get_rid());
g.navigation_debug_edge_connections_mesh.unref();
}
}
#endif // DEBUG_ENABLED
@ -891,7 +891,7 @@ void GridMap::_octant_clean_up(const OctantKey &p_key) {
g.navigation_debug_edge_connections_instance = RID();
}
if (g.navigation_debug_edge_connections_mesh.is_valid()) {
RenderingServer::get_singleton()->free(g.navigation_debug_edge_connections_mesh->get_rid());
g.navigation_debug_edge_connections_mesh.unref();
}
}
#endif // DEBUG_ENABLED