diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 11:25:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-17 09:55:17 +0200 |
commit | a86dd4df616227ed7e7be911653dac06973d8e25 (patch) | |
tree | ff05315d564ddaa1d796dc05f4c28eea6a7786c1 /bridges | |
parent | 6b6e044e05d272d89095b7f05f863c31da0da784 (diff) |
cid#1500585 Dereference before null check
Change-Id: I9374a580d3dce7c7851881ff8193946d46ed2bec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138384
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx index f36ca6431c8e..9fa6810d44da 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx @@ -253,11 +253,9 @@ std::type_info * RTTI::getRTTI(typelib_TypeDescription const & pTypeDescr) assert(false); // cannot happen } rtti = newRtti->get(); - if (newRtti) { - auto insertion ( - m_generatedRttis.emplace(unoName, std::move(newRtti))); - SAL_WARN_IF( !insertion.second, "bridges", "key " << unoName << " already in generated rtti map" ); - } + + auto insertion(m_generatedRttis.emplace(unoName, std::move(newRtti))); + SAL_WARN_IF( !insertion.second, "bridges", "key " << unoName << " already in generated rtti map" ); return rtti; } |