diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index a9ccee7ecadc..067ff74b8c39 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -1485,7 +1485,7 @@ void ScChangeActionContent::GetDescription( if (aTmpStr.isEmpty()) aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK ); - nPos = aRsc.indexOfAsciiL("#2", 2, nPos); + nPos = nPos >= 0 ? aRsc.indexOfAsciiL("#2", 2, nPos) : -1; if (nPos >= 0) { aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);