basic/source/sbx/sbxdbl.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 25bcd30895f8ebd2d47a8bab5a291690cf0e0aba
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Feb 28 12:02:05 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Feb 28 15:44:21 2022 +0100

    cid#707501 Uninitialized scalar variable
    
    Change-Id: I89f08a858b7a820fce1dd3bc2b914c3e5eb3d656
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130703
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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:

Reply via email to