From 24aaa8fbc5da8370506402facdb8ccaf563454e5 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 15 Feb 2022 21:34:21 +0800 Subject: ... --- include/cru/ui/render/LayoutRenderObject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/cru/ui/render') diff --git a/include/cru/ui/render/LayoutRenderObject.h b/include/cru/ui/render/LayoutRenderObject.h index 8fec3ada..11df0449 100644 --- a/include/cru/ui/render/LayoutRenderObject.h +++ b/include/cru/ui/render/LayoutRenderObject.h @@ -39,7 +39,7 @@ class LayoutRenderObject : public RenderObject { } void RemoveChild(Index position) { - Expects(position > 0 && position < GetChildCount()); + Expects(position >= 0 && position < GetChildCount()); children_[position].render_object->SetParent(nullptr); children_.erase(children_.begin() + position); InvalidateLayout(); -- cgit v1.2.3