[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara
caolanm at redhat.com
Sun Apr 30 14:27:27 UTC 2017
sfx2/source/control/unoctitm.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e0828cf746b1dcca7a1835f0fdb46cba83c8b589
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Apr 30 15:26:20 2017 +0100
coverity#1405738 Unchecked dynamic_cast
Change-Id: I15533651b1eff5c00d69f7a1e050997f25addabe
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 6f56aa1e1580..98210a528f4b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -744,8 +744,8 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
pItem = pDispatcher->Execute(GetId(), nCall, xSet.get(), &aInternalSet, nModifier);
if ( pItem != nullptr )
{
- if ( dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr )
- bSuccess = dynamic_cast< const SfxBoolItem *>( pItem )->GetValue();
+ if (const SfxBoolItem* pBoolItem = dynamic_cast<const SfxBoolItem*>(pItem))
+ bSuccess = pBoolItem->GetValue();
else if ( dynamic_cast< const SfxVoidItem *>( pItem ) == nullptr )
bSuccess = true; // all other types are true
}
More information about the Libreoffice-commits
mailing list