diff options
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index a5c954b05322..aa0896a414ad 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2070,6 +2070,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi // if no hint is set the variable is used as hint // the quotes of the hint have to be removed sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK' + if (nIndex == -1) + return OUString(); while(rCommand[nIndex] == ' ') ++nIndex; OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK " |