summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_editor.cpp2
-rw-r--r--editor/editor_settings.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 55542a59a2..5b24baabea 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -1646,7 +1646,7 @@ PropertyInfo AnimationKeyEditor::_find_hint_for_track(int p_idx, NodePath &r_bas
List<PropertyInfo> pinfo;
if (res.is_valid())
res->get_property_list(&pinfo);
- else
+ else if (node)
node->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 5b73d83691..f8c37d586d 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -253,8 +253,8 @@ static void _create_script_templates(const String &p_path) {
dir->change_dir(p_path);
for (int i = 0; i < keys.size(); i++) {
if (!dir->file_exists(keys[i])) {
- file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE);
- ERR_FAIL_COND(!file);
+ Error err = file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE);
+ ERR_FAIL_COND(err != OK);
file->store_string(templates[keys[i]]);
file->close();
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 0dcabb1776..433145a2ee 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3766,7 +3766,7 @@ bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String &p_targe
void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &path, const Point2 &p_point) {
child->set_name(path.get_file().get_basename());
- Ref<Texture> texture = Object::cast_to<Texture>(Ref<Texture>(ResourceCache::get(path)).ptr());
+ Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(ResourceCache::get(path)));
Size2 texture_size = texture->get_size();
editor_data->get_undo_redo().add_do_method(parent, "add_child", child);