cui/source/customize/cfg.cxx | 10 ++-------- sd/source/filter/eppt/epptso.cxx | 2 +- sw/source/filter/xml/xmltexti.cxx | 2 +- sw/source/ui/frmdlg/frmpage.cxx | 3 +-- sw/source/ui/ribbar/inputwin.cxx | 3 ++- vcl/source/app/svapp.cxx | 16 ++++++++-------- 6 files changed, 15 insertions(+), 21 deletions(-)
New commits: commit a4d059e2b139e1c0b49bbbf983112e15ea2f601b Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 14:11:04 2014 +0200 cid#704734 reference after null check Change-Id: I54a51427347bdd363fc980db4c1ef1a1feb99177 diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 6dfa105..cc47322 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -286,7 +286,7 @@ sal_uInt32 PPTWriter::ImplProgBinaryTagContainer( SvStream* pStrm, SvMemoryStrea .WriteUInt32( (sal_uInt32)0x5f005f ).WriteUInt32( (sal_uInt32)0x50005f ) .WriteUInt32( (sal_uInt32)0x540050 ).WriteUInt16( (sal_uInt16)0x39 ); } - if ( pBinTagStrm ) + if ( pStrm && pBinTagStrm ) { sal_uInt32 nLen = pBinTagStrm->Tell(); nSize += nLen + 8; commit ae8a688555b951d447120800006a1f6abfe7ebb5 Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 12:14:36 2014 +0200 cid#704597 dereference after null check this code dates back to the first commit, if the null check was valid the dereference should have triggered a bug by now. Change-Id: If074f68bde6a63083921f687e700321488842364 diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index f52a7e4..7402c3d 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -3986,10 +3986,7 @@ void ToolbarSaveInData::SetEntries( SvxEntries* pNewEntries ) { // delete old menu hierarchy first - if ( pRootEntry != NULL && pRootEntry->GetEntries() != NULL ) - { - delete pRootEntry->GetEntries(); - } + delete pRootEntry->GetEntries(); // now set new menu hierarchy pRootEntry->SetEntries( pNewEntries ); commit cf2e95aa5a7f0c34533e7d592e26b63573af3a46 Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 12:12:31 2014 +0200 cid#704596 dereference after null check this code dates back to the first commit, if the null check was valid the dereference should have triggered a bug by now. Change-Id: I7746bd26b6760dec4db522938e40a323be9ae4d8 diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index fb64911..f52a7e4 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1052,10 +1052,7 @@ void MenuSaveInData::SetEntries( SvxEntries* pNewEntries ) { // delete old menu hierarchy first - if ( pRootEntry != NULL ) - { - delete pRootEntry->GetEntries(); - } + delete pRootEntry->GetEntries(); // now set new menu hierarchy pRootEntry->SetEntries( pNewEntries ); commit 97c4c1cf5177493bc647fecd19a5f9b28134b081 Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 10:21:23 2014 +0200 cid#441406 dereference after null someone already tried to fix this, but the check was too late Change-Id: I63a8140009bc3f52ac924972a32c22603cf01971 diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 16d8544..2817168 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1322,16 +1322,16 @@ Window* Application::GetDefDialogParent() while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent ) pWin = pWin->mpWindowImpl->mpParent; - if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 ) + // check for corrupted window hierarchy, #122232#, may be we now crash somewhere else + if( !pWin->mpWindowImpl ) { - // check for corrupted window hierarchy, #122232#, may be we now crash somewhere else - if( !pWin->mpWindowImpl ) - { - OSL_FAIL( "Window hierarchy corrupted!" ); - pSVData->maWinData.mpFocusWin = NULL; // avoid further access - return NULL; - } + OSL_FAIL( "Window hierarchy corrupted!" ); + pSVData->maWinData.mpFocusWin = NULL; // avoid further access + return NULL; + } + if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 ) + { return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow(); } } commit a693fedcea3c4b3487c27ef6281c264d789a7c8c Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 09:56:02 2014 +0200 cid#705020 dereference after null check Change-Id: I11a208ef1648186c40249c27168fffd6a3419eff diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 8112b55..16f8ac5 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -400,8 +400,9 @@ void SwInputWindow::CancelFormula() pWrtShell->EndSelTblCells(); pView->GetEditWin().GrabFocus(); + + pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SFX_CALLMODE_ASYNCHRON); } - pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SFX_CALLMODE_ASYNCHRON); } const sal_Unicode CH_LRE = 0x202a; commit 6fd0c690a304361d42cbf940e2e399f15ae495f5 Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 09:53:25 2014 +0200 cid#705016 dereference after null check pLB was already dereferenced in the call to GetMapPos, so no point in checking it for null Change-Id: I8b9c5f5e5725829fdeaa61488168d0d289b02b4c diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 8670fb0..224477e 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1957,8 +1957,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) m_pAtVertPosFT->Enable( bEnable ); } - if (pLB) // only when Handler was called by changing of the controller - RangeModifyHdl( 0 ); + RangeModifyHdl( 0 ); sal_uInt16 nRel = 0; if (pLB->GetSelectEntryCount()) commit 6e0a080ef154596c3daa9c38f7e885a414fd2552 Author: Noel Grandin <n...@peralex.com> Date: Thu Feb 13 09:49:10 2014 +0200 cid#705006 dereference after null check no point in checking pDoc for null here, since we've already dereferenced it earlier Change-Id: If2d0268851654cb760458e6e138f0c92877adb8a diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 221ad67..8acec64 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -572,7 +572,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 ); aMediaDescriptor[0].Name = "URL"; aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); - if ( pDoc && pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() ) + if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() ) { uno::Reference< task::XInteractionHandler > xInteraction = pDoc->GetDocShell()->GetMedium()->GetInteractionHandler(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits