[Libreoffice-commits] core.git: 2 commits - svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Sat Sep 13 09:51:07 PDT 2014
svx/source/svdraw/svdcrtv.cxx | 4 ++--
sw/source/uibase/utlui/glbltree.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 46adbf9612e56179b783b48a293dc14850045aeb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 13 17:28:38 2014 +0100
coverity#704830 Dereference after null check
Change-Id: Ifb9e226b848bfcba593bc54558680738158adc36
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index b8ed6cb..a84c3ff 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -453,7 +453,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
pAktCreate->SetMergedItemSet(aDefaultAttr);
}
- if (HAS_BASE(SdrCaptionObj,pAktCreate))
+ if (pMod && HAS_BASE(SdrCaptionObj,pAktCreate))
{
SfxItemSet aSet(pMod->GetItemPool());
aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // in case someone turns on Solid
@@ -461,7 +461,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const
pAktCreate->SetMergedItemSet(aSet);
}
- if (nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
+ if (pMod && nInvent==SdrInventor && (nIdent==OBJ_TEXT || nIdent==OBJ_TEXTEXT ||
nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT))
{
// default for all text frames: no background, no border
commit 06287413acd3ea58051835a6de0383b668164f27
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 13 17:26:28 2014 +0100
coverity#705042 Dereference after null check
Change-Id: Iac532477802588333560497767a613bb0a55effe
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 83f23c3..994cd53 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -431,10 +431,10 @@ sal_uInt16 SwGlobalTree::GetEnableFlags() const
if(nSelCount == 1)
{
nRet |= ENABLE_EDIT;
- if( ((SwGlblDocContent*)pEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN &&
+ if (pEntry && ((SwGlblDocContent*)pEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN &&
(!pPrevEntry || ((SwGlblDocContent*)pPrevEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN))
nRet |= ENABLE_INSERT_TEXT;
- if( GLBLDOC_SECTION == ((SwGlblDocContent*)pEntry->GetUserData())->GetType() )
+ if (pEntry && GLBLDOC_SECTION == ((SwGlblDocContent*)pEntry->GetUserData())->GetType())
nRet |= ENABLE_EDIT_LINK;
}
else if(!nEntryCount)
More information about the Libreoffice-commits
mailing list