Skip to content

Commit

Permalink
Fix GridMap freeing edge connection debug mesh too early
Browse files Browse the repository at this point in the history
Fixes GridMap freeing edge connection debug mesh too early.
  • Loading branch information
smix8 committed Dec 14, 2024
1 parent dc5f1b7 commit c098556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/gridmap/grid_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c098556

Please sign in to comment.