diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-28 12:01:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-28 15:43:56 +0100 |
commit | 34d3f1601cf2dcb1c931d9454f2a06741f9e8b87 (patch) | |
tree | 69c7e27bc98c104fd44b6fe38420be8e8af0274b /basic/source/sbx | |
parent | d83323462452fb793b849758a0d975f3bd353ac9 (diff) |
cid#707500 Uninitialized scalar variable
Change-Id: I4680b59483ae827cbceb567968dc6c4e864f7ad4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130702
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/sbxdate.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 6b695a9c40c7..057e16f09d03 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -84,14 +84,8 @@ double ImpGetDate( const SbxValues* p ) 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: case SbxSTRING: |