mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Merge pull request #65444 from Trashtalk217/fix-_edit_get_rect-navigation-link-2D
Fixed crash with calling _edit_get_rect() on NavigationLink2D
This commit is contained in:
commit
e350d79cda
@ -113,6 +113,10 @@ void NavigationLink2D::_notification(int p_what) {
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
Rect2 NavigationLink2D::_edit_get_rect() const {
|
||||
if (!is_inside_tree()) {
|
||||
return Rect2();
|
||||
}
|
||||
|
||||
real_t radius = NavigationServer2D::get_singleton()->map_get_link_connection_radius(get_world_2d()->get_navigation_map());
|
||||
|
||||
Rect2 rect(get_start_location(), Size2());
|
||||
|
Loading…
Reference in New Issue
Block a user