summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-03-07 17:23:40 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-07 20:33:58 -0600
commitdc563d3a4b772835d60068c81c77ffae8d11cc61 (patch)
tree85c0874b745a45dd43ca833b8a2b1076ca169c4a /sc
parent807a7af5ea1ee8417794c0eab3ce57aa92c2ea16 (diff)
coverity#704693 Unchecked dynamic cast
Change-Id: I5363aeccf469b70a76ee66f8f70dff1eb18cac52
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/scmod.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index dd0935c3fd5f..c2a643822d59 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1728,7 +1728,14 @@ bool ScModule::IsTableLocked()
SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId );
ScAnyRefModalDlg* pModalDlg = GetCurrentAnyRefDlg();
if ( pChildWnd )
- bLocked = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())->IsTableLocked();
+ {
+ IAnyRefDialog* pRefDlg(dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()));
+ assert(pRefDlg);
+ if(pRefDlg)
+ {
+ bLocked = pRefDlg->IsTableLocked();
+ }
+ }
else if( pModalDlg )
bLocked = pModalDlg->IsTableLocked();
else