diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-09 17:24:40 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-15 20:15:39 +0200 |
commit | 75ee58fd0476360c67375cf403f06644a0aa117e (patch) | |
tree | dbfda27d4bcd56ed9dc6362c2e51521059e98788 /editor/editor_autoload_settings.cpp | |
parent | 5f1e56ff26be4070496aa51095b9ac2f2b4f4ed8 (diff) | |
download | redot-engine-75ee58fd0476360c67375cf403f06644a0aa117e.tar.gz |
[Editor] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'editor/editor_autoload_settings.cpp')
-rw-r--r-- | editor/editor_autoload_settings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 24daab3c12..6658669d66 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -425,14 +425,14 @@ Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { Object *obj = ClassDB::instantiate(ibt); - ERR_FAIL_COND_V_MSG(!obj, nullptr, vformat("Cannot instance script for Autoload, expected 'Node' inheritance, got: %s.", ibt)); + ERR_FAIL_NULL_V_MSG(obj, nullptr, vformat("Cannot instance script for Autoload, expected 'Node' inheritance, got: %s.", ibt)); n = Object::cast_to<Node>(obj); n->set_script(scr); } } - ERR_FAIL_COND_V_MSG(!n, nullptr, vformat("Path in Autoload not a node or script: %s.", p_path)); + ERR_FAIL_NULL_V_MSG(n, nullptr, vformat("Path in Autoload not a node or script: %s.", p_path)); return n; } |