sw/source/core/crsr/pam.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 974d6b443208050b0aa3ae8df32e121ab7a474ec Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Feb 16 00:59:49 2024 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Feb 17 20:21:06 2024 +0100 avoid using subView on empty OUString it causes assertion failure rtl::OUString SwPaM::GetText() const: Assertion `(nEnd-nStart) == (aTmpStr.getLength() - nStart)' failed Change-Id: Ie479f224e8a1516735f96c3a09181d4c46dba10d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163461 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Gökay ŞATIR <[email protected]> (cherry picked from commit 0b0b70772f2d9836010e523bff0132b626713862) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163501 Tested-by: Jenkins diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 79d9718b59fd..6fc9c6f5d6b7 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1323,7 +1323,7 @@ OUString SwPaM::GetText() const } const OUString& aTmpStr = pTextNode->GetText(); - if (bIsStartNode || bIsEndNode) + if (!aTmpStr.isEmpty() && (bIsStartNode || bIsEndNode)) { // Handle corner cases of start/end node(s) const sal_Int32 nStart = bIsStartNode
