[Libreoffice-commits] core.git: 3 commits - sfx2/source svtools/source
Caolán McNamara
caolanm at redhat.com
Wed Feb 12 06:27:16 PST 2014
sfx2/source/control/bindings.cxx | 2 +-
svtools/source/brwbox/brwbox2.cxx | 2 +-
svtools/source/misc/itemdel.cxx | 22 +++++++++-------------
3 files changed, 11 insertions(+), 15 deletions(-)
New commits:
commit 9cbc25dd6e31fc5fd2a25067fe924626451f9376
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 12 14:24:48 2014 +0000
Revert "coverity#736486 try and make coverity see through this better"
This reverts commit a0bae848d42b675e4638420d632d710ed3cf76c3.
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index d6f7d65..ad56240 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -38,13 +38,12 @@ class SfxItemDesruptor_Impl
Link aLink;
private:
- DECL_LINK( Delete, SfxItemDesruptor_Impl * );
- SfxItemDesruptor_Impl( const SfxItemDesruptor_Impl& ); // n.i.
+ DECL_LINK( Delete, void * );
+ SfxItemDesruptor_Impl( const SfxItemDesruptor_Impl& ); // n.i.
public:
- SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt );
- void LaunchDeleteOnIdle();
- ~SfxItemDesruptor_Impl();
+ SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt );
+ ~SfxItemDesruptor_Impl();
};
// ------------------------------------------------------------------------
@@ -56,10 +55,7 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" );
pItem->SetKind( SFX_ITEMS_DELETEONIDLE );
-}
-void SfxItemDesruptor_Impl::LaunchDeleteOnIdle()
-{
// process in Idle
GetpApp()->InsertIdleHdl( aLink, 1 );
}
@@ -79,18 +75,18 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
}
// ------------------------------------------------------------------------
-IMPL_LINK(SfxItemDesruptor_Impl, Delete, SfxItemDesruptor_Impl*, pImpl)
+IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete)
{
{DBG_CHKTHIS(SfxItemDesruptor_Impl, 0);}
- delete pImpl;
+ delete this;
return 0;
}
-void DeleteItemOnIdle(SfxPoolItem* pItem)
+// ------------------------------------------------------------------------
+void DeleteItemOnIdle( SfxPoolItem* pItem )
{
DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" );
- SfxItemDesruptor_Impl *pDesruptor = new SfxItemDesruptor_Impl(pItem);
- pDesruptor->LaunchDeleteOnIdle();
+ new SfxItemDesruptor_Impl( pItem );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 27fae00bf28def2c23228101dac7cf8280c498b5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 12 13:10:20 2014 +0000
coverity#441136 Dereference after null check
Change-Id: I81a1a70094ae6b4ed685ae3fe88c645b160955bf
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 1760056e..26438c0 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -829,7 +829,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pBar->Draw(pDev, aHeaderPos, aHeaderSize, nFlags);
// draw the "upper left cell" (the intersection between the header bar and the handle column)
- if (( pFirstCol->GetId() == 0 ) && ( pFirstCol->Width() > 4 ))
+ if (pFirstCol && (pFirstCol->GetId() == 0) && (pFirstCol->Width() > 4))
{
ButtonFrame aButtonFrame( aRealPos,
Size( pFirstCol->Width()-1, nTitleHeight-1 ),
commit 2842e32490ad23602065e29d2cfe38adfeb483cb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 12 13:09:09 2014 +0000
coverity#441125 Dereference after null check
Change-Id: Ia8046dc20ff46612ad3ffeba098bee079858e8da
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 905fcfe..a441dfa 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1609,7 +1609,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
pDispatcher->Update_Impl();
// modifying the SfxObjectInterface-stack without SfxBindings => nothing to do
- SfxViewFrame* pFrame = pDispatcher->GetFrame();
+ SfxViewFrame* pFrame = pDispatcher ? pDispatcher->GetFrame() : NULL;
if ( (pFrame && !pFrame->GetObjectShell()->AcceptStateUpdate()) || pSfxApp->IsDowning() || pImp->pCaches->empty() )
{
DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
More information about the Libreoffice-commits
mailing list