summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r--sw/source/filter/xml/xmlimp.cxx8
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 );