diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:37:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:37:03 +0000 |
commit | a5ce2b6157d08f8576e28e6c2b07f9281a87b252 (patch) | |
tree | 37283607c6d2131cd894c6d1dc588218d326627b /sd/source | |
parent | 819d7342b250df89505cfa8d1bf12cc693b3b648 (diff) |
coverity#1265808 Dereference null return value
Change-Id: Ib4ba32315a12a25ed5b9c4df5d6f88ee0400d054
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/drviews6.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 9ceea4d53566..d35ddefd646f 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -92,8 +92,11 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet) sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); - if ( GetViewFrame()->HasChildWindow(nId) ) - pDlg = static_cast<SvxFontWorkDialog*>(GetViewFrame()->GetChildWindow(nId)->GetWindow()); + if (GetViewFrame()->HasChildWindow(nId)) + { + SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId); + pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL; + } if ( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); |