diff options
author | Noel Power <noel.power@novell.com> | 2011-03-28 14:23:40 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-03-28 14:24:30 +0100 |
commit | 66098b0f5457b4f5888549db1677b22095c51248 (patch) | |
tree | 390518b399495d1dbfb6be7dcab7d7b6c47764be /idl/source | |
parent | 8ca3d48fc6c8167e75f0c19dd67207d5e5ff75c5 (diff) |
tweak list access to prevent iterating past end
Diffstat (limited to 'idl/source')
-rwxr-xr-x | idl/source/objects/slot.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index d4f7be793cc5..96cd09677f58 100755 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -1191,7 +1191,10 @@ void SvMetaSlot::WriteSlot( const ByteString & rShellName, sal_uInt16 nCount, { // look for the next slot with the same StateMethod like me // the slotlist is set to the current slot - for (SvSlotElementList::iterator it = pCurSlot+1; it != rSlotList.end(); ++it) + + SvSlotElementList::iterator it = ( pCurSlot != rSlotList.end() ) ? ++pCurSlot : rSlotList.end(); + + for ( ; it != rSlotList.end(); ++it) { pNextSlot = (*it)->xSlot; |