summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-02 15:17:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-02 20:08:19 +0000
commitfb2bc8d9aa6e265c0be8f70a759be4c37e27228d (patch)
tree4276ba897f2c3d904dfef8cf48a0748db9288212 /sc
parent2ca6426e38799236ebe676f08e0c063f8e3fd6d6 (diff)
coverity#704718 Dereference after null check
Change-Id: Ide237c6192b5e678260c2c6d8207d11362007f02
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/formatsh.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 243c3498b07c..a8c30d9710bd 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -197,8 +197,8 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
{
SCTAB nCurTab = GetViewData()->GetTabNo();
OUString aPageStyle = pDoc->GetPageStyle( nCurTab );
- SfxStyleSheet* pStyleSheet = (SfxStyleSheet*)pStylePool->
- Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheet* pStyleSheet = pStylePool ? (SfxStyleSheet*)pStylePool->
+ Find( aPageStyle, SFX_STYLE_FAMILY_PAGE ) : NULL;
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );