diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2011-05-26 15:33:07 -0430 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-05-27 10:12:04 +0100 |
commit | c71190405392bdd79feef66e426f2de2bb1107f3 (patch) | |
tree | be60bb9940932469313ad760cb953461b6812124 /vcl/source/control | |
parent | 20bcc31a9e90f94f5a304ad99197d2c3d9b84140 (diff) |
Make sure we dont oob when erasing.
Signed-off-by: Noel Power <noel.power@novell.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/ilstbox.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 4a75a05f00d2..b1010860a513 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -274,10 +274,10 @@ sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry void ImplEntryList::RemoveEntry( sal_uInt16 nPos ) { - boost::ptr_vector<ImplEntryType>::iterator iter = maEntries.begin()+ nPos; - - if (iter != maEntries.end()) + if (nPos < maEntries.size()) { + boost::ptr_vector<ImplEntryType>::iterator iter = maEntries.begin()+ nPos; + if ( !!iter->maImage ) mnImages--; |