summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwtxtsh.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-24 14:48:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-24 14:48:51 +0000
commit428f51c768e47571ab44abd08923c2fc4442898d (patch)
tree925adb2c7877cd1dd8ad6af6e4081f824a1faca4 /sw/source/uibase/shells/drwtxtsh.cxx
parent98e9ac947d5150c0f4272ac0da7f3de35937d1f8 (diff)
coverity#1265805 Dereference null return value
Change-Id: I2b09de69fcb0a717562b502f50f6f80e1245f0e4
Diffstat (limited to 'sw/source/uibase/shells/drwtxtsh.cxx')
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 2fe29bd8d735..ccadc8f92a06 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -244,8 +244,11 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- if ( pVFrame->HasChildWindow(nId) )
- pDlg = static_cast<SvxFontWorkDialog*>(pVFrame->GetChildWindow(nId)->GetWindow());
+ if (pVFrame->HasChildWindow(nId))
+ {
+ SfxChildWindow* pWnd = pVFrame->GetChildWindow(nId);
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ }
if ( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();