Fix stop crashing with UIWidget::moveChildToIndex.
This commit is contained in:
parent
01e6169cfb
commit
a02c091376
|
@ -418,7 +418,7 @@ void UIWidget::moveChildToIndex(const UIWidgetPtr& child, int index)
|
||||||
if(!child)
|
if(!child)
|
||||||
return;
|
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));
|
g_logger.traceError(stdext::format("moving %s to index %d on %s", child->getId(), index, m_id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue