summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-24 14:50:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-24 14:50:02 +0000
commit58f88c968c94e129630d36e70c6e59ad515ad888 (patch)
treebbcb8d20b4b15d2ff44240de8efb4e49d78c91eb
parent428f51c768e47571ab44abd08923c2fc4442898d (diff)
coverity#1265804 Dereference null return value
Change-Id: Ie5622275aa5534714001ad04cf0ae4af365b3a9c
-rw-r--r--sc/source/ui/drawfunc/drawsh4.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx
index 09a0f7b55b54..4de97fc9bb7f 100644
--- a/sc/source/ui/drawfunc/drawsh4.cxx
+++ b/sc/source/ui/drawfunc/drawsh4.cxx
@@ -40,8 +40,11 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet)
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame();
- if ( pViewFrm->HasChildWindow(nId) )
- pDlg = static_cast<SvxFontWorkDialog*>(pViewFrm->GetChildWindow(nId)->GetWindow());
+ if (pViewFrm->HasChildWindow(nId))
+ {
+ SfxChildWindow* pWnd = pViewFrm->GetChildWindow(nId);
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ }
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();