From ce140e2fb1a70e185a17ec908add18c4244a7faa Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Dec 2012 01:59:15 +0300 Subject: Fix crash with next control button (TAB). --- src/gui/widgets/popuplist.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/popuplist.cpp') diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp index 211de45e5..260dcb6a9 100644 --- a/src/gui/widgets/popuplist.cpp +++ b/src/gui/widgets/popuplist.cpp @@ -45,8 +45,8 @@ PopupList::PopupList(DropDown *const widget, mScrollArea->setPosition(mPadding, mPadding); add(mScrollArea); - if (getParent()) - getParent()->addFocusListener(this); +// if (getParent()) +// getParent()->addFocusListener(this); if (gui) gui->addGlobalFocusListener(this); @@ -57,6 +57,8 @@ PopupList::PopupList(DropDown *const widget, PopupList::~PopupList() { + if (getParent()) + getParent()->removeFocusListener(this); if (gui) gui->removeGlobalFocusListener(this); removeKeyListener(mDropDown); -- cgit v1.2.3-60-g2f50