summaryrefslogtreecommitdiff
path: root/scene/2d/joint_2d.cpp
diff options
context:
space:
mode:
authorRicardo Buring <ricardo.buring@gmail.com>2022-02-27 16:55:57 +0100
committerRicardo Buring <ricardo.buring@gmail.com>2022-02-27 16:55:57 +0100
commit184105e7538a6fa79380c1e400583958be6e6af3 (patch)
tree72dbcc962350824605dc3152765aedcbe9a89e17 /scene/2d/joint_2d.cpp
parentff877adf0f6a9f2073e95d6fd6c59515b9e90cd2 (diff)
Joint2D and Joint3D: disconnect only connected signals
Diffstat (limited to 'scene/2d/joint_2d.cpp')
-rw-r--r--scene/2d/joint_2d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/joint_2d.cpp b/scene/2d/joint_2d.cpp
index 0467c39746..521efe6567 100644
--- a/scene/2d/joint_2d.cpp
+++ b/scene/2d/joint_2d.cpp
@@ -128,7 +128,7 @@ void Joint2D::set_node_a(const NodePath &p_node_a) {
return;
}
- if (joint.is_valid()) {
+ if (is_configured()) {
_disconnect_signals();
}
@@ -145,7 +145,7 @@ void Joint2D::set_node_b(const NodePath &p_node_b) {
return;
}
- if (joint.is_valid()) {
+ if (is_configured()) {
_disconnect_signals();
}
@@ -164,7 +164,7 @@ void Joint2D::_notification(int p_what) {
} break;
case NOTIFICATION_EXIT_TREE: {
- if (joint.is_valid()) {
+ if (is_configured()) {
_disconnect_signals();
_update_joint(true);
}