[Libreoffice-commits] core.git: sd/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 28 14:02:48 UTC 2019
sd/source/ui/view/drtxtob.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 71bb4786a8888fd31c3c530f32bd58a1015501a9
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Apr 28 14:34:02 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Apr 28 16:01:52 2019 +0200
tdf#120703 PVS: dereference before nullptr check
V595 The 'mpViewShell' pointer was utilized before it was verified against nullptr.
Check lines: 193, 201.
Change-Id: I0d3cfee4d6f7bbb536c463b698361a1d299d2863
Reviewed-on: https://gerrit.libreoffice.org/71469
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index eb24ff617932..a5694b2c5af3 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -190,6 +190,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
SdrOutliner *pOutliner = mpView->GetTextEditOutliner();
+ assert(mpViewShell);
+
if( dynamic_cast< const OutlineView *>( mpView ) != nullptr)
{
pOLV = static_cast<OutlineView*>(mpView)->GetViewByWindow(
@@ -201,7 +203,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if(pOLV && !pOLV->GetSelection().HasRange())
{
- if( mpViewShell && mpViewShell->GetViewShell() && mpViewShell->GetViewShell()->GetWindow() )
+ if (mpViewShell->GetViewShell() && mpViewShell->GetViewShell()->GetWindow())
{
LanguageType nInputLang = mpViewShell->GetViewShell()->GetWindow()->GetInputLanguage();
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
More information about the Libreoffice-commits
mailing list