summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-26 10:42:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-26 12:14:41 +0000
commit6ede99c8ed7b1e4546ddfbac6f1cdb4cba34d7e5 (patch)
tree554ddc69cf6dd8b109eee05f7063e446b043a0f6 /sw/source/uibase
parent2a721220c6886a729cab8aab1f14926f5bf18981 (diff)
coverity#1266471 Dereference null return value
Change-Id: I8ef36169011b1ef9d4b163e1b019a44b2d5add03
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 7ea637ec7976..1b98e7bce1b8 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -613,7 +613,10 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
- pDlg = static_cast<SvxFontWorkDialog*>(pVFrame->GetChildWindow(nId)->GetWindow());
+ {
+ SfxChildWindow *pChildWindow = pVFrame->GetChildWindow(nId);
+ pDlg = pChildWindow ? static_cast<SvxFontWorkDialog*>(pChildWindow->GetWindow()) : NULL;
+ }
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();