Page 1 of 1

[BUG] ComboBox Crash

Posted: Wed Nov 26, 2008 04:39
by earthsruler
Hey all.

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.

Posted: Wed Nov 26, 2008 10:02
by CrazyEddie
Hi,

Thanks for the bug :) I'm glad you found it this week and not next, hehe. I'll fix it immediately.

CE.

Posted: Wed Nov 26, 2008 23:45
by earthsruler
:shock: whats happening next week?

And thanks for the fix ill test it out later today (if i get time to update and rebuild our dependencies).

ER.

Posted: Thu Nov 27, 2008 09:40
by CrazyEddie
earthsruler wrote::shock: whats happening next week?

All being well, a 0.6.2 release.

CE.