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
This commit is contained in:
Julien Nabet 2024-06-26 10:55:25 +02:00
parent 4d0ba0bade
commit 3c91fb758a

View file

@ -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 );