Kaydet (Commit) 51aada2a authored tarafından Mike Kaganski's avatar Mike Kaganski

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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 71bb4786
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment