diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 10:20:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 16:30:33 +0100 |
commit | bfe345e8b7e4fc4ea5ee480398f64fadd1fe91e6 (patch) | |
tree | 898826c8b7ef473937ba300b853ae2ab2e98fe7a /dbaccess | |
parent | 0f6c6baf61324db4d872411773fbf4ad18653f7f (diff) |
coverity#1242480 Dereference null return value
Change-Id: I9818e647915bd2b973c617feb7efd256621cf2de
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index dadbb5c467fb..d21a590507fa 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -223,13 +223,13 @@ namespace dbaui aValue.reset(); SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, true ); - if ( pItem->ISA( SfxBoolItem ) ) + if (const SfxBoolItem *pBoolItem = PTR_CAST(SfxBoolItem, pItem)) { - aValue.reset( PTR_CAST( SfxBoolItem, pItem )->GetValue() ); + aValue.reset( pBoolItem->GetValue() ); } - else if ( pItem->ISA( OptionalBoolItem ) ) + else if (const OptionalBoolItem *pOptionalItem = PTR_CAST(OptionalBoolItem, pItem)) { - aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue(); + aValue = pOptionalItem->GetFullValue(); } else OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown boolean item type!" ); |