summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-18 16:47:20 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-22 13:26:07 +0200
commite7fb91b9920532657ee3c8c9fd5eeaacf76751de (patch)
treefc5ccf5e735195dc2d63b19a9cb0964306225a66
parenttdf#101376 don't detach thread if it is the main thread on macOS (diff)
downloadcore-e7fb91b9920532657ee3c8c9fd5eeaacf76751de.tar.gz
core-e7fb91b9920532657ee3c8c9fd5eeaacf76751de.zip
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 (cherry picked from commit 629621929e9f21d5b5eb78eb03f5d2a167aece74) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158154 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-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;
}