summaryrefslogtreecommitdiff
path: root/sw/source/ui/dbui/mailmergehelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dbui/mailmergehelper.cxx')
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 0fff9f762131..0423137cc3c3 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -627,8 +627,16 @@ SwMergeAddressItem SwAddressIterator::Next()
aRet.bIsColumn = true;
xub_StrLen nClose = sAddress.Search('>');
DBG_ASSERT(nClose != STRING_NOTFOUND, "closing '>' not found");
- aRet.sText = sAddress.Copy(1, nClose - 1);
- sAddress.Erase(0, nClose + 1);
+ if( nClose != STRING_NOTFOUND )
+ {
+ aRet.sText = sAddress.Copy(1, nClose - 1);
+ sAddress.Erase(0, nClose + 1);
+ }
+ else
+ {
+ aRet.sText = sAddress.Copy(1, 1);
+ sAddress.Erase(0, 1);
+ }
}
else
{