Fix crash in certain scenarios with comboboxes

We have to remove the combobox filter to avoid crashes in case that we
receive a kMouseDownMessage when the native window is already
destroyed.
This commit is contained in:
David Capello 2021-05-26 08:26:39 -03:00
parent 73790a9dc8
commit d75bf49852

View File

@ -682,6 +682,8 @@ void ComboBox::openListBox()
void ComboBox::closeListBox()
{
if (m_window) {
removeMessageFilters();
m_listbox->clean();
m_window->closeWindow(this);
@ -690,7 +692,6 @@ void ComboBox::closeListBox()
m_window = nullptr;
m_listbox = nullptr;
removeMessageFilters();
putSelectedItemAsCustomWidget();
m_entry->requestFocus();