summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/aeitem.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index cafa6fe3a3b7..2d2ce6d10ea5 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -108,10 +108,9 @@ void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const OUString &rValue )
SfxAllEnumValue_Impl aVal;
aVal.nValue = nValue;
aVal.aText = rValue;
- sal_uInt16 nPos = GetPosByValue(nValue);
if ( !pValues )
pValues.reset( new SfxAllEnumValueArr );
- else if ( nPos != USHRT_MAX )
+ else if ( sal_uInt16 nPos = GetPosByValue(nValue); nPos != USHRT_MAX )
{
// remove when exists
pValues->erase( pValues->begin() + nPos );