Kaydet (Commit) a8ddd3b0 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#92467 crashes with empty history list on pressing down

regression from some 16->32 bit listbox limit changing

Change-Id: I045eeef935afed4154fe11bfd11916c2d6a722e9
(cherry picked from commit c51d5706)
üst b0f8ade4
...@@ -1613,8 +1613,9 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) ...@@ -1613,8 +1613,9 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
) )
{ {
DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" ); DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" );
if( nSelect >= mpEntryList->GetEntryCount() ) sal_Int32 nCount = mpEntryList->GetEntryCount();
nSelect = mpEntryList->GetEntryCount()-1; if (nSelect >= nCount)
nSelect = nCount ? nCount-1 : LISTBOX_ENTRY_NOTFOUND;
bool bCurPosChange = (mnCurrentPos != nSelect); bool bCurPosChange = (mnCurrentPos != nSelect);
mnCurrentPos = nSelect; mnCurrentPos = nSelect;
if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange)) if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange))
...@@ -1674,8 +1675,9 @@ void ImplListBoxWindow::SelectEntry( vcl::StringEntryIdentifier _entry ) ...@@ -1674,8 +1675,9 @@ void ImplListBoxWindow::SelectEntry( vcl::StringEntryIdentifier _entry )
// normalize // normalize
OSL_ENSURE( nSelect < mpEntryList->GetEntryCount(), "ImplListBoxWindow::SelectEntry: how that?" ); OSL_ENSURE( nSelect < mpEntryList->GetEntryCount(), "ImplListBoxWindow::SelectEntry: how that?" );
if( nSelect >= mpEntryList->GetEntryCount() ) sal_Int32 nCount = mpEntryList->GetEntryCount();
nSelect = mpEntryList->GetEntryCount()-1; if (nSelect >= nCount)
nSelect = nCount ? nCount-1 : LISTBOX_ENTRY_NOTFOUND;
// make visible // make visible
ShowProminentEntry( nSelect ); ShowProminentEntry( nSelect );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment