Я делаю следующее и получаю эту ошибку отладки:
AguiWidgetBase* AguiWidgetContainer::recursiveGetWidgetUnderMouse(
AguiWidgetBase* root, const AguiMouseEventArgs &mouse)
{
AguiWidgetBase* currentNode = root;
bool foundsomething = true;
while(foundsomething)
{
foundsomething = false;
if(currentNode->getChildCntrolCount() > 0)
for (std::vector<AguiWidgetBase*>::const_reverse_iterator rit =
currentNode->getChildRBeginIterator();
rit < currentNode->getChildREndIterator(); ++rit)
{
if(!foundsomething)
if ((*rit)->intersectionWithPoint(mouse.getPosition()))
{
foundsomething = true;
currentNode = *rit;
}
}
}
return currentNode;
}
// ...
Сбой после того, как currentNode становится указателем на дочерний элемент root, и вылетает в for.
Что я делаю не так?
Спасибо