summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/userlist.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index d5bf672c84c4..8dda6d2a5153 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -79,12 +79,15 @@ void ScUserListData::InitTokens()
nLen = 0;
bFirst = false;
}
- if (*p == cSep && nLen)
+ if (*p == cSep)
{
- OUString aSub(p0, nLen);
- String aUpStr = aSub;
- ScGlobal::pCharClass->toUpper(aUpStr);
- maSubStrings.push_back(new SubStr(aSub, aUpStr));
+ if (nLen)
+ {
+ OUString aSub(p0, nLen);
+ String aUpStr = aSub;
+ ScGlobal::pCharClass->toUpper(aUpStr);
+ maSubStrings.push_back(new SubStr(aSub, aUpStr));
+ }
bFirst = true;
}
}