diff options
-rw-r--r-- | core/bind/core_bind.cpp | 8 | ||||
-rw-r--r-- | editor/editor_node.cpp | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 27a04faef4..2921626f3a 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -71,7 +71,13 @@ Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String &p RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) { - RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache); + Error err = OK; + RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache, &err); + + if (err != OK) { + ERR_EXPLAIN("Error loading resource: '" + p_path + "'"); + ERR_FAIL_COND_V(err != OK, ret); + } return ret; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7f8ee79304..8609697518 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1021,7 +1021,7 @@ void EditorNode::_save_scene(String p_file, int idx) { current_option = -1; accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied.")); + accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances or inheritance) couldn't be satisfied.")); accept->popup_centered_minsize(); return; } @@ -1029,6 +1029,13 @@ void EditorNode::_save_scene(String p_file, int idx) { // force creation of node path cache // (hacky but needed for the tree to update properly) Node *dummy_scene = sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE); + if (!dummy_scene) { + current_option = -1; + accept->get_ok()->set_text(TTR("I see..")); + accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances or inheritance) couldn't be satisfied.")); + accept->popup_centered_minsize(); + return; + } memdelete(dummy_scene); int flg = 0; |