[Libreoffice-commits] core.git: toolkit/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 25 13:02:28 UTC 2020


 toolkit/source/awt/vclxwindows.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 0e1ea352a0b9063aa0b467c6ae279d0b9da51ab4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jul 25 11:47:52 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jul 25 15:01:41 2020 +0200

    cid#1465510 Dereference null return value
    
    and
    
    cid#1465511 Dereference null return value
    
    Change-Id: Ie297ef070ecf712e989704b8c07907e2f6453cd9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99428
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 0986a3a77cce..f3a29af6465b 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -5650,6 +5650,8 @@ void VCLXNumericField::setProperty( const OUString& PropertyName, const css::uno
                 if ( bVoid )
                 {
                     NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
+                    if (!pNumericFormatter)
+                        return;
                     pNumericFormatter->EnableEmptyFieldValue( true );
                     pNumericFormatter->SetEmptyFieldValue();
                 }
@@ -5695,6 +5697,8 @@ void VCLXNumericField::setProperty( const OUString& PropertyName, const css::uno
                 if ( Value >>= b )
                 {
                     NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
+                    if (!pNumericFormatter)
+                        return;
                     pNumericFormatter->SetUseThousandSep( b );
                 }
             }
@@ -5954,6 +5958,8 @@ void VCLXMetricField::setProperty( const OUString& PropertyName, const css::uno:
                 if ( Value >>= b )
                 {
                     NumericFormatter* pNumericFormatter = static_cast<NumericFormatter*>(GetFormatter());
+                    if (!pNumericFormatter)
+                        return;
                     pNumericFormatter->SetUseThousandSep( b );
                 }
             }


More information about the Libreoffice-commits mailing list