mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +02:00
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)
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user