summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/main/instance_placeholder.cpp2
-rw-r--r--scene/main/scene_tree.cpp5
-rw-r--r--scene/resources/visual_shader_nodes.h4
3 files changed, 8 insertions, 3 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();
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 2badf19f2b..dbf3150ae0 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1507,8 +1507,11 @@ void SceneTree::_live_edit_instance_node_func(const NodePath &p_parent, const St
Node *n2 = n->get_node(p_parent);
Node *no = ps->instance();
- no->set_name(p_name);
+ if (!no) {
+ continue;
+ }
+ no->set_name(p_name);
n2->add_child(no);
}
}
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index cafc7a0f00..4585e7fdcc 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -1624,13 +1624,13 @@ public:
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- void set_comparsion_type(ComparsionType p_func);
+ void set_comparsion_type(ComparsionType p_type);
ComparsionType get_comparsion_type() const;
void set_function(Function p_func);
Function get_function() const;
- void set_condition(Condition p_mode);
+ void set_condition(Condition p_cond);
Condition get_condition() const;
virtual Vector<StringName> get_editable_properties() const;