summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xidl/source/objects/slot.cxx5
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;