starmath/source/node.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 3c91fb758a429f51b89dfe9cea088691ced6d0c1 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Jun 26 10:55:25 2024 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Jun 26 18:57:03 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 <serval2...@yahoo.fr> Tested-by: Jenkins diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 7be9effe4175..49ef500c2059 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 );