diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-28 12:02:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-28 15:44:21 +0100 |
commit | 25bcd30895f8ebd2d47a8bab5a291690cf0e0aba (patch) | |
tree | 57d46967e2f9d65073bbbfb76ecc78ec78c0c0b3 /basic/source/sbx | |
parent | 34d3f1601cf2dcb1c931d9454f2a06741f9e8b87 (diff) |
cid#707501 Uninitialized scalar variable
Change-Id: I89f08a858b7a820fce1dd3bc2b914c3e5eb3d656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130703
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic/source/sbx')
-rw-r--r-- | basic/source/sbx/sbxdbl.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index aca18b3197e3..206a835b4e27 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -61,9 +61,7 @@ double ImpGetDouble( const SbxValues* p ) nRes = ImpSalUInt64ToDouble( p->uInt64 ); break; case SbxDECIMAL: case SbxBYREF | SbxDECIMAL: - if( p->pDecimal ) - p->pDecimal->getDouble( nRes ); - else + if (!p->pDecimal || !p->pDecimal->getDouble(nRes)) nRes = 0.0; break; case SbxBYREF | SbxSTRING: |