diff options
| author | Juan Linietsky | 2015-11-28 20:57:23 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-11-28 20:57:23 -0300 |
| commit | 68aaa0f813bed1e33a55b05d70c560023a3d0c6a (patch) | |
| tree | 91a4400e48eb2183d4b15ea526a2f253017fb210 /core/object.cpp | |
| parent | 7aa39b7cae364347cf379bb8f216adf0a79f37c7 (diff) | |
| parent | 68c56f81f9f77f1296826be382958e2ecc38826b (diff) | |
| download | godot-68aaa0f813bed1e33a55b05d70c560023a3d0c6a.tar.gz godot-68aaa0f813bed1e33a55b05d70c560023a3d0c6a.tar.zst godot-68aaa0f813bed1e33a55b05d70c560023a3d0c6a.zip | |
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'core/object.cpp')
| -rw-r--r-- | core/object.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/object.cpp b/core/object.cpp index 07ac430d7..3a4c06e7e 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -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 { |
