You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add two missing Null checks
These Null checks were removed in #10581 but actually changed the logic of the functions in this case. This fixes #10654
This commit is contained in:
@@ -1546,7 +1546,9 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
|
||||
scr = NULL;
|
||||
}
|
||||
} else {
|
||||
on_script = obj->get_script();
|
||||
if (obj) {
|
||||
on_script = obj->get_script();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2237,7 +2239,9 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
|
||||
scr = NULL;
|
||||
}
|
||||
} else {
|
||||
on_script = obj->get_script();
|
||||
if (obj) {
|
||||
on_script = obj->get_script();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user