summaryrefslogtreecommitdiff
path: root/scene/main/instance_placeholder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/instance_placeholder.cpp')
-rw-r--r--scene/main/instance_placeholder.cpp2
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();