mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be castable to Ref<Script>. There were only 5 places in the code that made this assumption. This commit fixes that.
This commit is contained in:
parent
8e652a1400
commit
20b0046945
3 changed files with 18 additions and 11 deletions
|
@ -1366,7 +1366,10 @@ Array Object::_get_incoming_connections() const {
|
|||
void Object::get_signal_list(List<MethodInfo> *p_signals) const {
|
||||
|
||||
if (!script.is_null()) {
|
||||
Ref<Script>(script)->get_script_signal_list(p_signals);
|
||||
Ref<Script> scr = script;
|
||||
if (scr.is_valid()) {
|
||||
scr->get_script_signal_list(p_signals);
|
||||
}
|
||||
}
|
||||
|
||||
ClassDB::get_signal_list(get_class_name(), p_signals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue