starmath/source/node.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit c58857f114041b4ab89ef818dd33581b3425ff06 Author: Julien Nabet <[email protected]> AuthorDate: Wed Jun 26 10:55:25 2024 +0200 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Wed Jun 26 23:05:43 2024 +0200 tdf#161786: fix Math crash when typing "oper" Change-Id: I8332e87e703f9138b8d13985b8697ad4b9f2191e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169539 Reviewed-by: Julien Nabet <[email protected]> Tested-by: Jenkins (cherry picked from commit 3c91fb758a429f51b89dfe9cea088691ced6d0c1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169585 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 778baaa74dca..69a7591af0d2 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2189,7 +2189,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell bool bIsSpecialSymbol = false; bool bIsArabic = false; - if (nullptr != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText.subView(1)))) + if ((!GetToken().aText.isEmpty()) + && (nullptr + != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText.subView(1))))) { sal_UCS4 cChar = pSym->GetCharacter(); OUString aTmp( &cChar, 1 );
