Commit efad303f authored by Olivier Teulière's avatar Olivier Teulière

* skins2/controls/ctrl_tree.cpp: Check that the iterator is not end() before using it...

   This fixes random freezes when loading skins with a PlayTree control on Windows, and probably some crashes as well.
parent a5a9346c
......@@ -771,7 +771,7 @@ void CtrlTree::makeImage()
{
it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it );
} while( it->m_deleted );
} while( it != m_rTree.end() && it->m_deleted );
}
}
}
......@@ -859,7 +859,7 @@ void CtrlTree::makeImage()
do {
it = m_flat ? m_rTree.getNextLeaf( it )
: m_rTree.getNextVisibleItem( it );
} while( it->m_deleted );
} while( it != m_rTree.end() && it->m_deleted );
}
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment