diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-04 19:19:41 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-04 19:19:41 +0200 |
commit | 27e86fe677d24f99a22f51bbef2de5bee3872580 (patch) | |
tree | f44f8035b929432e0971a75894840e38eeec9179 /dbaccess | |
parent | 23275beec1eabe3f3c3d1655b806811862df8f94 (diff) |
coverity#735691 Unchecked dynimic cast
Change-Id: I5b26469792cf7b2ac6b1b28e2419cadeea09a37d
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/propertystorage.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx index f13c3a1862e8..3d59a5ee4398 100644 --- a/dbaccess/source/ui/misc/propertystorage.cxx +++ b/dbaccess/source/ui/misc/propertystorage.cxx @@ -62,7 +62,12 @@ namespace dbaui // TODO: one could throw an IllegalArgumentException here - finally, this method // is (to be) used from within an XPropertySet::setPropertyValue implementation, // where this would be the appropriate reaction on wrong value types - boost::scoped_ptr< ITEMTYPE > pClone( dynamic_cast< ITEMTYPE* >( pTypedItem->Clone() ) ); + ITEMTYPE* pCloneItem = dynamic_cast< ITEMTYPE* >( pTypedItem->Clone() ); + if(!pCloneItem) + { + return false; + } + boost::scoped_ptr< ITEMTYPE > pClone( pCloneItem); assert(pClone.get()); pClone->SetValue( aValue ); _rSet.Put( *pClone ); |