An attempt to fix #2997

More fixes might be needed on the other platforms
This commit is contained in:
Lukas Matena 2019-09-28 09:57:26 +02:00
parent 0abde9a2a8
commit 5ded376fe2

View file

@ -131,7 +131,7 @@ ObjectList::ObjectList(wxWindow* parent) :
{
wxDataViewItemArray sels;
GetSelections(sels);
if (sels.front() == m_last_selected_item)
if (! sels.empty() && sels.front() == m_last_selected_item)
m_last_selected_item = sels.back();
else
m_last_selected_item = event.GetItem();