diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 14:13:25 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-28 16:02:15 +0200 |
commit | 51aada2a6f2cacf0134e14bd6559bc71c746c4a5 (patch) | |
tree | b59fa2932b186129d842892c2f99f47ad5e17c16 /sd/source | |
parent | 71bb4786a8888fd31c3c530f32bd58a1015501a9 (diff) |
tdf#120703 PVS: dereference before nullptr check
V595 The 'mpViewShell' pointer was utilized before it was verified against nullptr.
Check lines: 96, 125.
Change-Id: I824c6cf8a5ed7f0ef20e99df36c83feec7fe54ea
Reviewed-on: https://gerrit.libreoffice.org/71468
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 4cfe98f8431a..629cecbecfd3 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -92,6 +92,8 @@ void TextObjectBar::Execute( SfxRequest &rReq ) std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard; + assert(mpViewShell); + if( dynamic_cast< const OutlineView *>( mpView ) != nullptr) { pOLV = static_cast<OutlineView*>(mpView) @@ -124,7 +126,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } else { - if( mpViewShell && mpViewShell->GetViewFrame() ) + if (mpViewShell->GetViewFrame()) mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_STYLE_DESIGNER, SfxCallMode::ASYNCHRON ); } |