[Libreoffice-commits] .: vcl/source
Noel Power
noelp at kemper.freedesktop.org
Fri May 27 02:12:21 PDT 2011
vcl/source/control/ilstbox.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1a39c92f1435c4f363beb8d288f6a11e723c70bb
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Thu May 26 15:33:07 2011 -0430
Make sure we dont oob when erasing.
Signed-off-by: Noel Power <noel.power at novell.com>
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 340a349..cbe5de3 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--;
More information about the Libreoffice-commits
mailing list