1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-07 19:53:17 +00:00

Merge pull request #96372 from CreatedBySeb/fix-signal-copying

Fix copying a Node with a signal potentially resulting in an Editor crash
This commit is contained in:
Thaddeus Crews
2025-03-11 09:35:01 -05:00
2 changed files with 11 additions and 1 deletions

View File

@@ -453,7 +453,13 @@ void ConnectDialog::_update_ok_enabled() {
}
void ConnectDialog::_update_warning_label() {
Ref<Script> scr = source->get_node(dst_path)->get_script();
Node *dst = source->get_node(dst_path);
if (dst == nullptr) {
warning_label->set_visible(false);
return;
}
Ref<Script> scr = dst->get_script();
if (scr.is_null()) {
warning_label->set_visible(false);
return;

View File

@@ -3063,7 +3063,11 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
if (!target) {
continue;
}
NodePath ptarget = p_original->get_path_to(target);
if (ptarget.is_empty()) {
continue;
}
Node *copytarget = target;