summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrollodel <33117082+trollodel@users.noreply.github.com>2022-05-23 11:39:44 +0200
committertrollodel <33117082+trollodel@users.noreply.github.com>2022-05-23 12:21:13 +0200
commit51b229bffa06da41ae1b07957fd8a3b6ac567593 (patch)
treee5587382c0d77536cc37e5cda62de3b6734fc3d7
parent603de7a0557cdbdd5405e345b55901f506cc5b40 (diff)
Fix Joint3D and Joint2D warning causing a crash
-rw-r--r--scene/2d/joint_2d.cpp2
-rw-r--r--scene/3d/joint_3d.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp
index b527a72de6..7b9f7e14ca 100644
--- a/scene/2d/joint_2d.cpp
+++ b/scene/2d/joint_2d.cpp
@@ -50,6 +50,7 @@ void Joint2D::_disconnect_signals() {
void Joint2D::_body_exit_tree() {
_disconnect_signals();
_update_joint(true);
+ update_configuration_warnings();
}
void Joint2D::_update_joint(bool p_only_free) {
@@ -64,7 +65,6 @@ void Joint2D::_update_joint(bool p_only_free) {
if (p_only_free || !is_inside_tree()) {
PhysicsServer2D::get_singleton()->joint_clear(joint);
warning = String();
- update_configuration_warnings();
return;
}
diff --git a/scene/3d/joint_3d.cpp b/scene/3d/joint_3d.cpp
index c22e3f6d91..b6fc83e599 100644
--- a/scene/3d/joint_3d.cpp
+++ b/scene/3d/joint_3d.cpp
@@ -49,6 +49,7 @@ void Joint3D::_disconnect_signals() {
void Joint3D::_body_exit_tree() {
_disconnect_signals();
_update_joint(true);
+ update_configuration_warnings();
}
void Joint3D::_update_joint(bool p_only_free) {
@@ -65,7 +66,6 @@ void Joint3D::_update_joint(bool p_only_free) {
if (p_only_free || !is_inside_tree()) {
PhysicsServer3D::get_singleton()->joint_clear(joint);
warning = String();
- update_configuration_warnings();
return;
}