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 /sw/source/filter/xml/xmlimp.cxx | |
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 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 7742dd6bbb9b..cf6e4f86da07 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1065,8 +1065,12 @@ void SwXMLImport::MergeListsAtDocumentInsertPosition(SwDoc *pDoc) if (! pListId2) return; - const OUString& sListId1 = dynamic_cast<const SfxStringItem*>(pListId1)->GetValue(); - const OUString& sListId2 = dynamic_cast<const SfxStringItem*>(pListId2)->GetValue(); + auto pStringListId1 = dynamic_cast<const SfxStringItem*>(pListId1); + assert(pStringListId1); + const OUString& sListId1 = pStringListId1->GetValue(); + auto pStringListId2 = dynamic_cast<const SfxStringItem*>(pListId2); + assert(pStringListId2); + const OUString& sListId2 = pStringListId2->GetValue(); const SwList* pList1 = pDoc->getIDocumentListsAccess().getListByName( sListId1 ); const SwList* pList2 = pDoc->getIDocumentListsAccess().getListByName( sListId2 ); |