Our application can close the active window with Escape.
If I have an open list box and hover over an item that is not the one that was selected before hand, and then hit escape it crashes.
the problem code is this:
Code: Select all
void ComboDropList::onCaptureLost(WindowEventArgs& e)
{
Listbox::onCaptureLost(e);
d_armed = false;
hide();
e.internalHandled = true;
// ensure 'sticky' selection remains.
if ((d_lastClickSelected) && !d_lastClickSelected->isSelected())
{
clearAllSelections();
setItemSelectState(d_lastClickSelected, true);
}
}
clearAllSelections() sets d_lastClickSelected to 0, then when setItemSelectState() is called it throws an exception.
ER.