diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-16 13:53:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-16 13:53:30 +0100 |
commit | 661f7bdefc8215f742951727b93395d47293cf0e (patch) | |
tree | 7f5e0b56bf39d2a4adb0df0b8b8dd6b8d51c6447 | |
parent | 6d42e7a35b1b887e86a5f9b9eacd5e5b951df8bf (diff) |
m_bHasActive must be false after last visible entry is removed
...otherwise, ExtensionBox_Impl::RecalcAll would crash in CalcActiveHeight(-1).
Change-Id: If399825951c79b821ed44ebefa19d1032ab4f850
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 3b9a3feb2c06..dd10ae00dfad 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -1224,7 +1224,13 @@ void ExtensionBox_Impl::checkEntries() if ( nPos < m_nActive ) m_nActive -= 1; else if ( ( nPos == m_nActive ) && ( nPos == (long) m_vEntries.size() - 1 ) ) + { m_nActive -= 1; + if (m_nActive == -1) + { + m_bHasActive = false; + } + } m_vRemovedEntries.push_back( *iIndex ); m_vEntries.erase( iIndex ); iIndex = m_vEntries.begin() + nPos; |