This can be easily reproduced:
Code: Select all
...
CEGUI::WindowManager& cMan = CEGUI::WindowManager::getSingleton();
// note memory address
CEGUI::ItemListbox* pList = static_cast<CEGUI::ItemListbox*> (cMan.getWindow("EditChecklist/Frame/ItemListbox/Checklist"));
CEGUI::ItemEntry* pItem = (CEGUI::ItemEntry*)(CEGUI::WindowManager::getSingleton().createWindow("WindowsLook/ListboxItem"));
pList->addItem(pItem);
pItem->select();
pList->removeItem(pItem);
// should return 0, but instead returns the memory address for the item that was just removed!
pItem = pList->getFirstSelectedItem();
if (pItem)
pItem->setText("Test"); // crash and burn...