summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index b662da41a52c..2da88e9b98ca 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1992,7 +1992,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const
aPortion2.sText = aLeftOverText.makeStringAndClear();
aRet.push_back( aPortion2 );
}
- else
+ else if (!aLeftOverText.isEmpty() && !aRet.empty())
{ // we just need to append the left-over text to the last portion (which had no errors)
aRet[ aRet.size() - 1 ].sText += aLeftOverText;
}