summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-05-13 05:22:47 +0200
committerAndras Timar <andras.timar@collabora.com>2014-05-18 22:11:16 +0200
commit9cf43fd5c714a02331ec6a2bbb0e3d452f3a1c63 (patch)
tree8342e73822dcdbd4e21d25cc09d1b116c8a5bc36 /basic
parent6015a51f49127b83b9e89e2b04ea4b1d4c2673cc (diff)
i#64348 basic: fix CDec() crash if string is empty
Change-Id: I92e9472e14c00a6550081f0d58a352faa5b78b98 Reviewed-on: https://gerrit.libreoffice.org/9336 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxdec.cxx6
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);