mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 22:23:04 +00:00
fixed crash when creating new object with wrong number of arguments
This commit is contained in:
parent
e4c872a260
commit
bc998c9195
@ -970,7 +970,10 @@ void Object::set_script_instance(ScriptInstance *p_instance) {
|
||||
|
||||
script_instance=p_instance;
|
||||
|
||||
script=p_instance->get_script().get_ref_ptr();
|
||||
if (p_instance)
|
||||
script=p_instance->get_script().get_ref_ptr();
|
||||
else
|
||||
script=RefPtr();
|
||||
}
|
||||
|
||||
RefPtr Object::get_script() const {
|
||||
|
Loading…
Reference in New Issue
Block a user