Merge pull request #2937 from koalefant/master

fixed crash when creating new object with wrong number of arguments (rebased)
This commit is contained in:
Rémi Verschelde 2015-11-28 18:15:47 +01:00
commit 280d72eb8b
1 changed files with 4 additions and 1 deletions

View File

@ -970,7 +970,10 @@ void Object::set_script_instance(ScriptInstance *p_instance) {
script_instance=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 { RefPtr Object::get_script() const {