summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-06-26 10:55:25 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-06-26 18:57:03 +0200
commit3c91fb758a429f51b89dfe9cea088691ced6d0c1 (patch)
treebc11b7a4520606921e31949c0cb85c72e8d55bdf
parent4d0ba0badeb5a83d8eb5373ba5d7ef931dcf62c9 (diff)
tdf#161786: fix Math crash when typing "oper"
Change-Id: I8332e87e703f9138b8d13985b8697ad4b9f2191e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169539 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
-rw-r--r--starmath/source/node.cxx4
1 files changed, 3 insertions, 1 deletions
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 );