diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-05-13 05:22:47 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-05-13 12:15:55 +0000 |
commit | c8ea99e9832c2098639b268377df7486309f66fb (patch) | |
tree | 4f8d08bb3b2afdf323be28d8533177f07a26391e | |
parent | a226019bb5431ca04cae28fefb6b83e2bb738243 (diff) |
i#64348 basic: fix CDec() crash if string is emptylibreoffice-4-1
Change-Id: I92e9472e14c00a6550081f0d58a352faa5b78b98
Reviewed-on: https://gerrit.libreoffice.org/9337
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r-- | basic/source/sbx/sbxdec.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 276b78857e56..25d7936b4592 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -194,6 +194,8 @@ void SbxDecimal::setUInt( unsigned int val ) bool SbxDecimal::setString( OUString* pOUString ) { + assert(pOUString); + static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); // Convert delimiter @@ -472,7 +474,9 @@ start: case SbxLPSTR: case SbxSTRING: case SbxBYREF | SbxSTRING: - pnDecRes->setString( p->pOUString ); break; + if( p->pOUString ) + pnDecRes->setString( p->pOUString ); + break; case SbxOBJECT: { SbxValue* pVal = PTR_CAST(SbxValue,p->pObj); |