diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 19:09:13 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 21:05:56 +0100 |
commit | f04803ecd33210bebfc85d60690c26200424a077 (patch) | |
tree | 819f0fd8752da3ec24a40066a249956240cfe679 /sw/source/ui | |
parent | dc5c767882d91a1c42410b86d0e33eaf72ed9a81 (diff) |
coverity#736863 Dereference before null check
Change-Id: If719ed8411ee65c6b81452434810a21ac1da7e58
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/misc/num.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 74b50619db2f..d81d767c04ca 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -972,14 +972,14 @@ void SwSvxNumBulletTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ; - FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); + FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell)); aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric) ) ); rPage.PageCreated(aSet); } else if (nPageId == m_nPositionPageId) { SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell(); - FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell)); + FieldUnit eMetric = ::GetDfltMetric(pDocShell->ISA(SwWebDocShell)); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) ); rPage.PageCreated(aSet); |