1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

[Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable

This commit is contained in:
A Thousand Ships
2023-09-09 17:24:40 +02:00
parent 5f1e56ff26
commit 75ee58fd04
61 changed files with 217 additions and 217 deletions

View File

@@ -51,7 +51,7 @@ template <typename Func>
void _for_all(TabContainer *p_node, const Func &p_func) {
for (int i = 0; i < p_node->get_tab_count(); i++) {
ScriptEditorDebugger *dbg = Object::cast_to<ScriptEditorDebugger>(p_node->get_tab_control(i));
ERR_FAIL_COND(!dbg);
ERR_FAIL_NULL(dbg);
p_func(dbg);
}
}
@@ -133,7 +133,7 @@ ScriptEditorDebugger *EditorDebuggerNode::_add_debugger() {
void EditorDebuggerNode::_stack_frame_selected(int p_debugger) {
const ScriptEditorDebugger *dbg = get_debugger(p_debugger);
ERR_FAIL_COND(!dbg);
ERR_FAIL_NULL(dbg);
if (dbg != get_current_debugger()) {
return;
}
@@ -405,7 +405,7 @@ void EditorDebuggerNode::_update_errors() {
void EditorDebuggerNode::_debugger_stopped(int p_id) {
ScriptEditorDebugger *dbg = get_debugger(p_id);
ERR_FAIL_COND(!dbg);
ERR_FAIL_NULL(dbg);
bool found = false;
_for_all(tabs, [&](ScriptEditorDebugger *p_debugger) {
@@ -603,7 +603,7 @@ void EditorDebuggerNode::_remote_tree_button_pressed(Object *p_item, int p_colum
}
TreeItem *item = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!item);
ERR_FAIL_NULL(item);
if (p_id == EditorDebuggerTree::BUTTON_SUBSCENE) {
remote_scene_tree->emit_signal(SNAME("open"), item->get_meta("scene_file_path"));