mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix a segfault in ConnectDialog if the destination node does not exist
This commit is contained in:
parent
61598c5c88
commit
ed108fc993
1 changed files with 7 additions and 1 deletions
|
|
@ -452,7 +452,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue