tdf#163486: PVS: redundant nullptr check
V668 There is no sense in testing the 'm_pRelStorElement->m_xStorage' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: Ie195de78b48c3766ef08a2d3666f778f75d2ca6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176596 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
parent
19e1cf2d1c
commit
45bb8d9ddc
1 changed files with 1 additions and 2 deletions
|
@ -1582,8 +1582,7 @@ void OStorage_Impl::CreateRelStorage()
|
|||
{
|
||||
m_pRelStorElement = new SotElement_Impl( u"_rels"_ustr, true, true );
|
||||
m_pRelStorElement->m_xStorage = CreateNewStorageImpl(embed::ElementModes::WRITE);
|
||||
if (m_pRelStorElement->m_xStorage)
|
||||
m_pRelStorElement->m_xStorage->m_pParent = nullptr; // the relation storage is completely controlled by parent
|
||||
m_pRelStorElement->m_xStorage->m_pParent = nullptr; // the relation storage is completely controlled by parent
|
||||
}
|
||||
|
||||
if (!m_pRelStorElement->m_xStorage)
|
||||
|
|
Loading…
Reference in a new issue