diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-19 10:10:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-19 11:31:09 +0000 |
commit | 765f3063982f17c5feacd5694dfee5b57ae5663a (patch) | |
tree | 752bb941fd6ddf3e2cea64fb77dbb8cedce965fd /writerfilter/source/dmapper/PropertyIds.cxx | |
parent | cff891fc44adcca745bcaa9ae95483bd63aa05ae (diff) |
CID#705119 (unlikely) invalid iterator
Change-Id: I6b6c99893f18deb1686fca9094037e2fada1b302
Diffstat (limited to 'writerfilter/source/dmapper/PropertyIds.cxx')
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 8916ff8b4ed1..a0c9dc48d5c7 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -45,7 +45,7 @@ PropertyNameSupplier::~PropertyNameSupplier() } -const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const +OUString PropertyNameSupplier::GetName( PropertyIds eId ) const { PropertyNameMap_t::iterator aIt = m_pImpl->aNameMap.find(eId); if(aIt == m_pImpl->aNameMap.end()) @@ -364,6 +364,11 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const if(aInsertIt.second) aIt = aInsertIt.first; } + + assert(aIt != m_pImpl->aNameMap.end()); + if (aIt == m_pImpl->aNameMap.end()) + return OUString(); + return aIt->second; } |