diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/navigation_server_2d.cpp | 2 | ||||
-rw-r--r-- | servers/navigation_server_2d.h | 2 | ||||
-rw-r--r-- | servers/navigation_server_3d.cpp | 2 | ||||
-rw-r--r-- | servers/navigation_server_3d.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index c4c10ebf3b..53190d7681 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -204,7 +204,7 @@ void NavigationServer2D::_bind_methods() { NavigationServer2D::NavigationServer2D() { singleton = this; ERR_FAIL_COND_MSG(!NavigationServer3D::get_singleton(), "The Navigation3D singleton should be initialized before the 2D one."); - NavigationServer3D::get_singleton()->connect("map_changed", callable_mp(this, &NavigationServer2D::_emit_map_changed)); + NavigationServer3D::get_singleton_mut()->connect("map_changed", callable_mp(this, &NavigationServer2D::_emit_map_changed)); } NavigationServer2D::~NavigationServer2D() { diff --git a/servers/navigation_server_2d.h b/servers/navigation_server_2d.h index 8ab479b8fd..2dd718e09c 100644 --- a/servers/navigation_server_2d.h +++ b/servers/navigation_server_2d.h @@ -52,7 +52,7 @@ protected: public: /// Thread safe, can be used across many threads. - static NavigationServer2D *get_singleton() { return singleton; } + static const NavigationServer2D *get_singleton() { return singleton; } /// MUST be used in single thread! static NavigationServer2D *get_singleton_mut() { return singleton; } diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 03c75369a6..d78e58bea0 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -84,7 +84,7 @@ void NavigationServer3D::_bind_methods() { ADD_SIGNAL(MethodInfo("map_changed", PropertyInfo(Variant::RID, "map"))); } -NavigationServer3D *NavigationServer3D::get_singleton() { +const NavigationServer3D *NavigationServer3D::get_singleton() { return singleton; } diff --git a/servers/navigation_server_3d.h b/servers/navigation_server_3d.h index c70d87ec16..f711e4e0e5 100644 --- a/servers/navigation_server_3d.h +++ b/servers/navigation_server_3d.h @@ -55,7 +55,7 @@ protected: public: /// Thread safe, can be used across many threads. - static NavigationServer3D *get_singleton(); + static const NavigationServer3D *get_singleton(); /// MUST be used in single thread! static NavigationServer3D *get_singleton_mut(); |