From a02c091376e94e731e357bc5538e6922eea1b038 Mon Sep 17 00:00:00 2001 From: BenDol Date: Fri, 4 Apr 2014 11:33:17 +1300 Subject: [PATCH] Fix stop crashing with UIWidget::moveChildToIndex. --- src/framework/ui/uiwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/ui/uiwidget.cpp b/src/framework/ui/uiwidget.cpp index a4660f91..bfd02882 100644 --- a/src/framework/ui/uiwidget.cpp +++ b/src/framework/ui/uiwidget.cpp @@ -418,7 +418,7 @@ void UIWidget::moveChildToIndex(const UIWidgetPtr& child, int index) if(!child) return; - if((uint)index - 1 > m_children.size()) { + if((uint)index - 1 >= m_children.size()) { g_logger.traceError(stdext::format("moving %s to index %d on %s", child->getId(), index, m_id)); return; }