summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-18 16:47:20 +0100
committerAndras Timar <andras.timar@collabora.com>2023-10-19 11:27:02 +0200
commit4beab2956d339fb5caac1684135c3cab25d2363e (patch)
tree286ead5b8570fdba2da9b28c8ceb5c2a98555528
parentf8e36903fe78a41f5cee952e9fd573a75eccf25f (diff)
crashreporting: svx::SentenceEditWindow_Impl::CreateSpellPortions()
cui/source/dialogs/SpellDialog.cxx:2005 aRet[ aRet.size() - 1 ].sText += aLeftOverText; presumably aRet is empty() here a) don't bother appending if aLeftOverText is empty() b) don't crah if aRet is empty() and aLeftOverText is not Change-Id: Ie9a9585f572d8afb17183b479fb6f2cce5952aa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158047 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 3c0db58e51a24bf08ca443af62489e761063f456) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158152
-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 cf7d03972bee..0975f5ebf245 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2001,7 +2001,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;
}