git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20876
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
else if ( flags & wxHTML_FIND_NEAREST_BEFORE )
{
- wxHtmlCell *c;
+ wxHtmlCell *c2, *c = NULL;
for ( const wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext() )
{
if (cell->GetPosY() > y ||
(cell->GetPosY() == y && cell->GetPosX() > x))
break;
- c = cell->FindCellByPos(x - cell->GetPosX(), y - cell->GetPosY(),
- flags);
- if (c) return c;
+ c2 = cell->FindCellByPos(x - cell->GetPosX(), y - cell->GetPosY(),
+ flags);
+ if (c2)
+ c = c2;
}
+ if (c) return c;
}
return NULL;