From aab8da25ad2c3e6d2df03abbc8e35c1725938c40 Mon Sep 17 00:00:00 2001 From: qarmin Date: Tue, 23 Jul 2019 09:14:31 +0200 Subject: Fix some code found by Coverity Scan and PVS Studio --- scene/main/instance_placeholder.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/main/instance_placeholder.cpp') 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 Refinstance(); + if (!scene) + return NULL; scene->set_name(get_name()); int pos = get_position_in_parent(); -- cgit v1.2.3