diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-14 13:58:14 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-14 14:14:36 +0200 |
commit | 0869895063bd528893707cb74c6cf4c461fef066 (patch) | |
tree | bf47ccc71145f3ee387a5dafbaab9bc86b47a008 /sfx2 | |
parent | 4acae16f9252ada89fd530f1ca86edafc046bc07 (diff) |
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer.
Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839
Reviewed-on: https://gerrit.libreoffice.org/70730
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index bcd013dda8be..772df9530ce5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1570,7 +1570,7 @@ bool SfxCommonTemplateDialog_Impl::Execute_Impl( if ( (nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId) && (pTreeBox->IsVisible() || aFmtLb->GetSelectionCount() <= 1) ) { const SfxUInt16Item *pFilterItem = dynamic_cast< const SfxUInt16Item* >(pItem); - OSL_ENSURE(pFilterItem, "SfxUINT16Item expected"); + assert(pFilterItem); SfxStyleSearchBits nFilterFlags = static_cast<SfxStyleSearchBits>(pFilterItem->GetValue()) & ~SfxStyleSearchBits::UserDefined; if(nFilterFlags == SfxStyleSearchBits::Auto) // User Template? nFilterFlags = static_cast<SfxStyleSearchBits>(pFilterItem->GetValue()); diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 012bc5b92219..4570cec72cc2 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1424,6 +1424,7 @@ std::shared_ptr<MetadatableUndo> Metadatable::CreateUndo() const { XmlIdRegistryDocument * pRegDoc( dynamic_cast<XmlIdRegistryDocument*>( m_pReg ) ); + assert(pRegDoc); std::shared_ptr<MetadatableUndo> xUndo( sfx2::XmlIdRegistryDocument::CreateUndo(*this) ); pRegDoc->RegisterCopy(*this, *xUndo, false); |