summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-30 15:26:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-30 15:26:20 +0100
commite0828cf746b1dcca7a1835f0fdb46cba83c8b589 (patch)
treedc68248de2c6337f1592b2393d92da0106bccce6 /sfx2
parent59676b310bc0eba154f323f5d32ed697fcbb227a (diff)
coverity#1405738 Unchecked dynamic_cast
Change-Id: I15533651b1eff5c00d69f7a1e050997f25addabe
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/unoctitm.cxx4
1 files changed, 2 insertions, 2 deletions
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
}