diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-23 15:08:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 15:08:44 +0200 |
commit | 4c943cca2c6d6cd7a197cb1601a6356e65254837 (patch) | |
tree | 0f906f50ff2013f20a274ea6c746c6574a15e1f2 /scene/main/instance_placeholder.cpp | |
parent | c7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff) | |
parent | aab8da25ad2c3e6d2df03abbc8e35c1725938c40 (diff) |
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
Diffstat (limited to 'scene/main/instance_placeholder.cpp')
-rw-r--r-- | scene/main/instance_placeholder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp index 71addd6fea..99ecc8bc37 100644 --- a/scene/main/instance_placeholder.cpp +++ b/scene/main/instance_placeholder.cpp @@ -92,6 +92,8 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene if (!ps.is_valid()) return NULL; Node *scene = ps->instance(); + if (!scene) + return NULL; scene->set_name(get_name()); int pos = get_position_in_parent(); |