You've already forked godot
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:
@@ -808,7 +808,7 @@ List<CanvasItem *> CanvasItemEditor::_get_edited_canvas_items(bool retrieve_lock
|
||||
}
|
||||
|
||||
Vector2 CanvasItemEditor::_anchor_to_position(const Control *p_control, Vector2 anchor) {
|
||||
ERR_FAIL_COND_V(!p_control, Vector2());
|
||||
ERR_FAIL_NULL_V(p_control, Vector2());
|
||||
|
||||
Transform2D parent_transform = p_control->get_transform().affine_inverse();
|
||||
Rect2 parent_rect = p_control->get_parent_anchorable_rect();
|
||||
@@ -821,7 +821,7 @@ Vector2 CanvasItemEditor::_anchor_to_position(const Control *p_control, Vector2
|
||||
}
|
||||
|
||||
Vector2 CanvasItemEditor::_position_to_anchor(const Control *p_control, Vector2 position) {
|
||||
ERR_FAIL_COND_V(!p_control, Vector2());
|
||||
ERR_FAIL_NULL_V(p_control, Vector2());
|
||||
|
||||
Rect2 parent_rect = p_control->get_parent_anchorable_rect();
|
||||
|
||||
@@ -3608,7 +3608,7 @@ void CanvasItemEditor::_draw_axis() {
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_draw_invisible_nodes_positions(Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
|
||||
ERR_FAIL_COND(!p_node);
|
||||
ERR_FAIL_NULL(p_node);
|
||||
|
||||
Node *scene = EditorNode::get_singleton()->get_edited_scene();
|
||||
if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
|
||||
@@ -3739,7 +3739,7 @@ void CanvasItemEditor::_draw_transform_message() {
|
||||
}
|
||||
|
||||
void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
|
||||
ERR_FAIL_COND(!p_node);
|
||||
ERR_FAIL_NULL(p_node);
|
||||
|
||||
Node *scene = EditorNode::get_singleton()->get_edited_scene();
|
||||
if (p_node != scene && p_node->get_owner() != scene && !scene->is_editable_instance(p_node->get_owner())) {
|
||||
|
||||
Reference in New Issue
Block a user