1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +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

@@ -82,7 +82,7 @@ void NavigationObstacle3DEditor::_menu_option(int p_option) {
}
void NavigationObstacle3DEditor::_wip_close() {
ERR_FAIL_COND_MSG(!obstacle_node, "Edited NavigationObstacle3D is not valid.");
ERR_FAIL_NULL_MSG(obstacle_node, "Edited NavigationObstacle3D is not valid.");
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Set NavigationObstacle3D Vertices"));
undo_redo->add_undo_method(obstacle_node, "set_vertices", obstacle_node->get_vertices());
@@ -344,12 +344,12 @@ EditorPlugin::AfterGUIInput NavigationObstacle3DEditor::forward_3d_gui_input(Cam
}
PackedVector2Array NavigationObstacle3DEditor::_get_polygon() {
ERR_FAIL_COND_V_MSG(!obstacle_node, PackedVector2Array(), "Edited object is not valid.");
ERR_FAIL_NULL_V_MSG(obstacle_node, PackedVector2Array(), "Edited object is not valid.");
return PackedVector2Array(obstacle_node->call("get_polygon"));
}
void NavigationObstacle3DEditor::_set_polygon(PackedVector2Array p_poly) {
ERR_FAIL_COND_MSG(!obstacle_node, "Edited object is not valid.");
ERR_FAIL_NULL_MSG(obstacle_node, "Edited object is not valid.");
obstacle_node->call("set_polygon", p_poly);
}