diff options
author | Nikhil Walvekar <nikhil.walvekar@synerzip.com> | 2013-12-16 12:22:02 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-19 13:58:33 +0000 |
commit | 828113d2293638e33ffe9e2737e09d2cd6c3b0e9 (patch) | |
tree | 631e988a1953ff76b9d33dc87462238a48345fbf /sw | |
parent | 6b5cac1ca06a052061d2fe6acff1bc1e3cb45d57 (diff) |
FILESAVE: DOCX. Added null check to avoid crash.
Change-Id: I6f61d69702f77f0291ad25f5c39974d263d273e8
Reviewed-on: https://gerrit.libreoffice.org/7096
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c2f3d58307b0..0c407eeee1f2 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2229,11 +2229,14 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if( !sStyle.isEmpty() ) { SwTxtFmtColl* pColl = GetExport().pDoc->FindTxtFmtCollByName(sStyle); - if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl) + if (pColl) { - if( !sTOption.isEmpty() ) - sTOption += ","; - sTOption += sStyle + sLvl; + if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl) + { + if( !sTOption.isEmpty() ) + sTOption += ","; + sTOption += sStyle + sLvl; + } } } } while( -1 != nPos ); |