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>
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 4cfe98f..629cecb 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -92,6 +92,8 @@
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 @@
}
else
{
if( mpViewShell && mpViewShell->GetViewFrame() )
if (mpViewShell->GetViewFrame())
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_STYLE_DESIGNER, SfxCallMode::ASYNCHRON );
}