[Libreoffice-commits] core.git: 21 commits - basctl/source chart2/source sd/source sfx2/source svx/source sw/source vcl/source xmlsecurity/source
Caolán McNamara
caolanm at redhat.com
Wed May 7 07:48:10 PDT 2014
basctl/source/basicide/baside2b.cxx | 3 +--
chart2/source/view/main/OpenglShapeFactory.cxx | 8 +++++---
sd/source/ui/app/sdmod1.cxx | 12 ++++++++----
sd/source/ui/dlg/animobjs.cxx | 12 +++++++-----
sd/source/ui/func/futhes.cxx | 4 ++--
sd/source/ui/unoidl/unomodel.cxx | 2 +-
sfx2/source/appl/sfxpicklist.cxx | 2 +-
sfx2/source/dialog/tplcitem.cxx | 7 +++++--
svx/source/dialog/_bmpmask.cxx | 7 +++----
svx/source/dialog/_contdlg.cxx | 10 +++-------
svx/source/dialog/imapdlg.cxx | 11 ++++++-----
svx/source/dialog/imapwnd.cxx | 2 +-
sw/source/core/doc/docnum.cxx | 3 ++-
sw/source/core/txtnode/ndtxt.cxx | 3 ++-
sw/source/core/unocore/unosect.cxx | 6 +++---
sw/source/filter/html/htmlbas.cxx | 4 +++-
sw/source/filter/xml/xmlexpit.cxx | 6 +++---
vcl/source/window/builder.cxx | 3 +++
xmlsecurity/source/dialogs/macrosecurity.cxx | 2 +-
19 files changed, 60 insertions(+), 47 deletions(-)
New commits:
commit 8c4acc98d192afbcad7654e63361593acd25b49c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 15:26:31 2014 +0100
coverity#735932 Explicit null dereferenced
Change-Id: I35ccc5ba619f7e861fca2c5e78de86d88480017d
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index 051ade2..63467af 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -276,7 +276,9 @@ void SwHTMLWriter::OutBasic()
for( sal_uInt16 j=0; j<pModules->Count(); j++ )
{
const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) );
- OSL_ENSURE( pModule, "Wo ist das Modul?" );
+ assert(pModule); //Wo ist das Modul?
+ if (!pModule)
+ continue;
OUString sLang(SVX_MACRO_LANGUAGE_STARBASIC);
ScriptType eType = STARBASIC;
commit b5e8833f57786336013b1607b9b92498aa554da4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 13:20:28 2014 +0100
coverity#735924 Explicit null dereferenced
Change-Id: I77044f6f9e99ddaa64cf69ba22205d6536a90b1b
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index f2eb49a..4d403a7 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -1115,11 +1115,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
pEnclosingSection = pEnclosingSection->GetParent();
}
- if (pEnclosingSection)
+ SwTOXBaseSection* const pTOXBaseSect = pEnclosingSection ?
+ PTR_CAST(SwTOXBaseSection, pEnclosingSection) : NULL;
+ if (pTOXBaseSect)
{
// convert section to TOXBase and get SwXDocumentIndex
- SwTOXBaseSection *const pTOXBaseSect =
- PTR_CAST(SwTOXBaseSection, pEnclosingSection);
const uno::Reference<text::XDocumentIndex> xIndex =
SwXDocumentIndex::CreateXDocumentIndex(
*pTOXBaseSect->GetFmt()->GetDoc(), *pTOXBaseSect);
commit f36614bb7892af1c0aabe49c95bf3824a746e6f9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 12:09:39 2014 +0100
coverity#735860 Explicit null dereferenced
Change-Id: I2c031ffc70e7ddacde52f120513f9dd5ff1a4c50
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index d6f2dad..f062407 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -86,11 +86,12 @@ void SvxIMapDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
if ( ( nSID == SID_IMAP_EXEC ) && pItem )
{
const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-
- DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem expected");
-
- // Disable Float if possible
- rIMap.SetExecState( !pStateItem->GetValue() );
+ assert(pStateItem); //SfxBoolItem expected
+ if (pStateItem)
+ {
+ // Disable Float if possible
+ rIMap.SetExecState( !pStateItem->GetValue() );
+ }
}
}
commit 88613ffedac1211c76c73ca9a979cf920fbd3c52
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 12:07:47 2014 +0100
coverity#735859 Explicit null dereferenced
Change-Id: I8edbf48bc981b4636dd55b5f4cd2b314d387486d
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index c81d40f..817202e 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -62,16 +62,12 @@ void SvxContourDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
if ( pItem && ( SID_CONTOUR_EXEC == nSID ) )
{
const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-
- DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem expected ");
-
- rDlg.SetExecState( !pStateItem->GetValue() );
+ assert(pStateItem); //SfxBoolItem expected
+ if (pStateItem)
+ rDlg.SetExecState(!pStateItem->GetValue());
}
}
-
-/******************************************************************************/
-
SvxContourDlgChildWindow::SvxContourDlgChildWindow( Window* _pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
commit 1084a75242729619967da7275fd2f42704954277
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:59:35 2014 +0100
coverity#735858 Explicit null dereferenced
Change-Id: Ia8964b4b7e38d7bba9417695f571858683c2fd5b
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 38af730..906757f 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -360,10 +360,9 @@ void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*
if ( ( nSID == SID_BMPMASK_EXEC ) && pItem )
{
const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
-
- DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem erwartet");
-
- rBmpMask.SetExecState( pStateItem->GetValue() );
+ assert(pStateItem); //SfxBoolItem erwartet
+ if (pStateItem)
+ rBmpMask.SetExecState( pStateItem->GetValue() );
}
}
commit 5d5d773fc716107eb0abdd457d500e0c53e4b450
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:54:07 2014 +0100
coverity#735848 Explicit null dereferenced
Change-Id: I9fb6da4d448923fd5b8822a72d6945a0c0b5f40d
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 33effd9..3ed5449 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -103,8 +103,11 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
else if( eState == SFX_ITEM_AVAILABLE )
{
const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem);
- DBG_ASSERT(pStateItem != 0, "BoolItem expected");
- nWaterCanState = pStateItem->GetValue() ? 1 : 0;
+ assert(pStateItem); //BoolItem expected
+ if (pStateItem)
+ nWaterCanState = pStateItem->GetValue() ? 1 : 0;
+ else
+ nWaterCanState = 0xff;
}
//not necessary if the last event is still on the way
if(!nUserEventId)
commit 5818415ded1685b7e635f2d759d9ac1b0b3cb27b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:52:49 2014 +0100
coverity#735842 Explicit null dereferenced
Change-Id: I53112795f301679429afb8da4e01c77e4d2fe820
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 52ef733..5ef64b3 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1871,7 +1871,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) ||
- pPDFExtOutDevData->GetIsExportHiddenSlides() )
+ (pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) )
{
::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
commit 017d9b48aa7d7836d907d9fcb8d061fb0f1a859a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:51:29 2014 +0100
coverity#735839 Dereference after null check
Change-Id: I1d07802f2671c460dbe145c4d5178aff272ca091
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index 101dc17..01b0ae9 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -70,7 +70,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
SfxErrorContext aContext(ERRCTX_SVX_LINGU_THESAURUS, OUString(),
mpWindow, RID_SVXERRCTX, &DIALOG_MGR() );
- if( mpViewShell && mpViewShell->ISA(DrawViewShell) )
+ if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
SdrTextObj* pTextObj = NULL;
@@ -117,7 +117,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
}
}
}
- else if ( mpViewShell->ISA(OutlineViewShell) )
+ else if (mpViewShell && mpViewShell->ISA(OutlineViewShell))
{
Outliner* pOutliner = mpDoc->GetOutliner();
OutlinerView* pOutlView = pOutliner->GetView(0);
commit 6c7d2e39e752980b08b0b87427dbfc15f89ae079
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:49:23 2014 +0100
coverity#735834 Explicit null dereferenced
Change-Id: I806058555f58a3f03153372e581fae6d8cb0670b
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 7313b9c..0030348 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -1276,11 +1276,13 @@ void AnimationControllerItem::StateChanged( sal_uInt16 nSId,
if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_ANIMATOR_STATE )
{
const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem );
- DBG_ASSERT( pStateItem, "SfxUInt16Item expected");
- sal_uInt16 nState = pStateItem->GetValue();
-
- pAnimationWin->aBtnGetOneObject.Enable( nState & 1 );
- pAnimationWin->aBtnGetAllObjects.Enable( nState & 2 );
+ assert(pStateItem); //SfxUInt16Item expected
+ if (pStateItem)
+ {
+ sal_uInt16 nState = pStateItem->GetValue();
+ pAnimationWin->aBtnGetOneObject.Enable( nState & 1 );
+ pAnimationWin->aBtnGetAllObjects.Enable( nState & 2 );
+ }
}
}
commit d386da8bb3e39e052e83a3aa166d1f1a305171f7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:47:23 2014 +0100
coverity#735832 Explicit null dereferenced
Change-Id: Ifcce7f0d75cb595add30a4403e5c42348043137b
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 21fec2b..f6f453c 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -658,11 +658,15 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
ApplyItemSet( SID_SD_EDITOPTIONS, *pRet.get() );
}
- if( pShell && pViewFrame )
+ ::sd::DrawDocShell* pDocShell(NULL);
+ if (pShell && pViewFrame)
{
- ::sd::DrawDocShell* pDocShell =
- PTR_CAST(::sd::DrawDocShell,pShell);
- SdDrawDocument* pDoc = pDocShell->GetDoc();
+ pDocShell = PTR_CAST(::sd::DrawDocShell, pShell);
+ }
+
+ if (pDocShell)
+ {
+ SdDrawDocument* pDoc = pDocShell->GetDoc();
::sd::ViewShellBase* pBase =
::sd::ViewShellBase::GetViewShellBase (
commit 2241ffeaa50085161e009902eb18f4d7ae1afcb7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:36:52 2014 +0100
coverity#1209611 Explicit null dereferenced
Change-Id: I1efe68a3b63ddd4b1583a29dd8d71d217bfdd9a8
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 8562374..0cfa9b7 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -375,7 +375,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
SfxEventHint* pEventHint = PTR_CAST(SfxEventHint,&rHint);
// only ObjectShell-related events with media interest
- SfxObjectShell* pDocSh = pEventHint->GetObjShell();
+ SfxObjectShell* pDocSh = pEventHint ? pEventHint->GetObjShell() : NULL;
if( !pDocSh )
return;
commit d348f398830e523cc07d3047e978be12d6327114
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:35:48 2014 +0100
coverity#1209592 Unchecked dynamic_cast
Change-Id: Id9ac29ec88a98e626a1ecfb364e474b2a11a8004
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 2ca81ca..56beb5e 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -154,7 +154,8 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape
xPropSet->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, aName );
SvxOpenGLObject* pObj = dynamic_cast<SvxOpenGLObject*>(xTarget.get());
- pObj->setRenderer(new OpenGLChartAdapter(xChart));
+ if (pObj)
+ pObj->setRenderer(new OpenGLChartAdapter(xChart));
xRet = getChartShape( xDrawPage );
}
commit 439d6a07f7bc69dfa6184fd24bed499a804980f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:35:12 2014 +0100
coverity#1209591 Unchecked dynamic_cast
Change-Id: Id9d014d01d4c2da2d2c421893ba49a4b2fddacc0
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 64b517e..2ca81ca 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -110,8 +110,9 @@ IOpenGLRenderer* getRenderer(const uno::Reference< drawing::XDrawPage>& xDrawPag
xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet;
if( aRet.equals("com.sun.star.chart2.shapes") )
{
- IOpenGLRenderer* pRenderer = dynamic_cast<SvxOpenGLObject*>(xShape.get())->getRenderer();
- if(pRenderer)
+ SvxOpenGLObject* pGLObj = dynamic_cast<SvxOpenGLObject*>(xShape.get());
+ IOpenGLRenderer* pRenderer = pGLObj ? pGLObj->getRenderer() : NULL;
+ if (pRenderer)
return pRenderer;
}
}
commit 5314bb664c7166ca20cc5da546d81e8b9ddea438
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:30:37 2014 +0100
coverity#1209590 Dereference after null check
Change-Id: Iedee81b4c0474a1bbda0b2366c246f6b6b433a10
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index dfeff73..f3858d1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1758,6 +1758,9 @@ void VclBuilder::handleTabChild(Window *pParent, xmlreader::XmlReader &reader)
break;
}
+ if (!pParent)
+ return;
+
TabControl *pTabControl = static_cast<TabControl*>(pParent);
VclBuilder::stringmap::iterator aFind = aProperties.find(OString("label"));
if (aFind != aProperties.end())
commit 5a5eb251d518b613e337e7a3cb495e1e7d692050
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:27:53 2014 +0100
coverity#1209588 Explicit null dereferenced
Change-Id: I6abb408c91c9d6ea2d60c328be221c7608a7906c
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 780e3fe..499dc3f 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -152,7 +152,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
const SvXMLAttrContainerItem *pUnknown =
PTR_CAST( SvXMLAttrContainerItem, &rItem );
- const sal_uInt16 nCount = pUnknown->GetAttrCount();
+ const sal_uInt16 nCount = pUnknown ? pUnknown->GetAttrCount() : 0;
for( sal_uInt16 i=0; i < nCount; i++ )
{
const OUString sPrefix( pUnknown->GetAttrPrefix( i ) );
commit 304d90669a036f31c23529e8838f09ed1d19efc1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:26:55 2014 +0100
coverity#1209587 Explicit null dereferenced
Change-Id: I51b3e9bccbe54686fbe869ce5ba669d000530572
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 49fd84b..780e3fe 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -132,8 +132,8 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
{
OUStringBuffer aOut;
const SfxBoolItem* pSplit = PTR_CAST(SfxBoolItem, &rItem);
- OSL_ENSURE( pSplit != NULL, "Wrong Which-ID" );
- const unsigned int eEnum = pSplit->GetValue() ? 1 : 0;
+ assert(pSplit); //Wrong Which-ID
+ const unsigned int eEnum = (pSplit && pSplit->GetValue()) ? 1 : 0;
rUnitConverter.convertEnum( aOut, eEnum, aXML_KeepTogetherType );
aValue = aOut.makeStringAndClear();
}
commit 148b9a23faf92c6b412d7d24baf22b8ed24503f4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:19:09 2014 +0100
coverity#1209554 Explicit null dereferenced
Change-Id: Iacf4373221b93a97e030b09501cc91589f2fdff7
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index c99b865..20b46d0 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1136,7 +1136,6 @@ OUString EditorWindow::GetActualSubName( sal_uLong nLine )
for( sal_uInt16 i=0; i < pMethods->Count(); i++ )
{
SbxVariable* p = PTR_CAST( SbMethod, pMethods->Get( i ) );
- OUString sName = p->GetName();
SbMethod* pMeth = p ? PTR_CAST( SbMethod, p ) : NULL;
if( pMeth )
{
@@ -1144,7 +1143,7 @@ OUString EditorWindow::GetActualSubName( sal_uLong nLine )
pMeth->GetLineRange(l1,l2);
if( (l1 <= nLine+1) && (nLine+1 <= l2) )
{
- return sName;
+ return pMeth->GetName();
}
}
}
commit 3e423ebe1cf7dfe64945bbe383908963e39dda65
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 11:06:46 2014 +0100
coverity#1209549 Unchecked dynamic_cast
Change-Id: I118771b78d83441202c15d3b08b9055ba5e63623
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 3fe7451..d6de6d5 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3506,7 +3506,8 @@ namespace {
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ==
+ const SwAttrSetChg* pSet = dynamic_cast<const SwAttrSetChg*>(pNewValue);
+ if ( pSet && pSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, false, &pItem ) ==
SFX_ITEM_SET )
{
// #i70748#
commit 93e09221311c78e39ba2e420cfb82849f6ebfe4e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 10:58:17 2014 +0100
coverity#1209527 Dereference after null check
Change-Id: I8a829ee5d36281098f2788a704b203e6b777d371
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 45a1d48..a19075d 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1963,7 +1963,8 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv )
}
CorrRel( aIdx, aInsPos, 0, false );
- pCNd->JoinNext();
+ if (pCNd)
+ pCNd->JoinNext();
}
rOrigPam.GetPoint()->nNode++;
commit 4877271537b2924a9295702b5fc1cfe5b3e803c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 10:53:56 2014 +0100
coverity#1209523 Dereference after null check
Change-Id: If4c218c471b34e2f0c8f083131bc24f1ac9d48e3
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index b341fc1..e591947 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -109,7 +109,7 @@ void IMapWindow::ReplaceImageMap( const ImageMap& rImageMap, bool /*bScaleToGrap
{
SdrObject* pNewObj = CreateObj( rImageMap.GetIMapObject( i - 1 ) );
- if ( pNewObj )
+ if (pNewObj && pPage)
{
pPage->InsertObject( pNewObj );
}
commit c029a81a794204d41b7ed65a501d6775f7a37c18
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed May 7 10:49:17 2014 +0100
coverity#1209500 Explicit null dereferenced
Change-Id: I11aa7ecfa52054085aaca70b165a831b5ec8577b
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 3c9eaeb..7433517 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -138,7 +138,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(Window* _pParent, MacroSecurity* _pDl
{
OSL_FAIL("illegal macro security level");
}
- if (bReadonly)
+ if (bReadonly && pImage)
{
pImage->Show(true);
m_pVeryHighRB->Enable(false);
More information about the Libreoffice-commits
mailing list