diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-20 14:33:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-21 07:26:51 +0100 |
commit | 526387b96e9bc2c04b0dc26744bf6b88ea7c0521 (patch) | |
tree | 3c80e92df338107d0b0e7ce3e889723a91d798e4 /vcl/source/control | |
parent | d9d8ec2521cd59940792902d4757f33c327130a3 (diff) |
loplugin:unnecessaryvirtual
Change-Id: I4ca101ba838afecbbc8e841a6a9fa6c9c0460f14
Reviewed-on: https://gerrit.libreoffice.org/65497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/combobox.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 3eca5c6f0598..a13ee2e4b2b7 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -921,8 +921,10 @@ void ComboBox::RemoveEntryAt(sal_Int32 const nPos) { const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount) + { + assert("bad position"); return; - + } m_pImpl->m_pImplLB->RemoveEntry( nPos + nMRUCount ); CallEventListeners( VclEventId::ComboboxItemRemoved, reinterpret_cast<void*>(nPos) ); } |