[Libreoffice-commits] core.git: 5 commits - oox/source sd/source svx/source sw/source

Caolán McNamara caolanm at redhat.com
Thu Apr 17 00:59:24 PDT 2014


 oox/source/export/drawingml.cxx             |    2 +-
 sd/source/ui/remotecontrol/Communicator.cxx |    5 ++---
 svx/source/svdraw/svdmrkv.cxx               |    2 +-
 sw/source/core/crsr/crstrvl.cxx             |    9 ++++++---
 sw/source/core/layout/wsfrm.cxx             |    2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 7bda5f04a693c7943bc4201c11e73ca45bead661
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 17 08:52:09 2014 +0100

    coverity#1202822 Dereference null return value
    
    Change-Id: I8630bfa0c4c557ab14c3b7448b6281072eebec8a

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a7085b8..ee0ac18 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2256,9 +2256,12 @@ bool SwCrsrShell::SelectNxtPrvHyperlink( bool bNext )
         else if( RES_DRAWFRMFMT == pFndFmt->Which() )
         {
             const SdrObject* pSObj = pFndFmt->FindSdrObject();
-            ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
-            MakeSelVisible();
-            bRet = true;
+            if (pSObj)
+            {
+                ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
+                MakeSelVisible();
+                bRet = true;
+            }
         }
         else // then is it a fly
         {
commit 4f4d8c8edbd0fc9f951c42cc1c02235b411a700f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 16 20:42:48 2014 +0100

    coverity#1202823 Dereference null return value
    
    Change-Id: I72d795203aedf34d32012ecee3c8fdfbc2a8a08f

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index fd60107..fb0cd6a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1031,7 +1031,7 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
     if (!bSuppressRotation)
     {
         SdrObject* pShape = (SdrObject*) GetSdrObjectFromXShape( rXShape );
-        nRotation=pShape->GetRotateAngle();
+        nRotation = pShape ? pShape->GetRotateAngle() : 0;
         if (nRotation != 0 && nRotation != 18000)
         {
             int faccos=bFlipV ? -1 : 1;
commit c152349f69acfb6bb873ed1cd12ca1b6dc325f1f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 16 20:41:44 2014 +0100

    coverity#1202882 Dereference before null check
    
    Change-Id: Ie61df08c11b687c0b4a3ae212b3f9a6c95171396

diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index d3af697..bf399ca 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -122,10 +122,9 @@ void Communicator::execute()
     pTransmitter->join();
     pTransmitter = NULL;
 
-    if( mpSocket )
-        mpSocket->close();
+    mpSocket->close();
     delete mpSocket;
-
+    mpSocket = NULL;
 
     RemoteServer::removeCommunicator( this );
 }
commit f510a9726e2ab9f0c8513cd90154bcf67739ceed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 16 20:38:33 2014 +0100

    coverity#735915 Dereference after null check
    
    Change-Id: I6a846af53a2e3492905d9c89e7e55da8778405a5

diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index cf6bced..1a99bc3 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1945,7 +1945,7 @@ void SwCntntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
 {
     sal_uInt8 nInvFlags = 0;
 
-    if( pNew && RES_ATTRSET_CHG == pNew->Which() )
+    if( pNew && RES_ATTRSET_CHG == pNew->Which() && pOld )
     {
         SfxItemIter aNIter( *((SwAttrSetChg*)pNew)->GetChgSet() );
         SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
commit 297df4434848902a771b6a01c6b210ffbf04a6dc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 16 20:37:26 2014 +0100

    coverity#704833 Dereference after null check
    
    Change-Id: I307a277ce8f473652afd084eb9848ecb27574714

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 4c26809..7d301ed 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1804,7 +1804,7 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
             if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=NULL;
         }
         if (pObj!=NULL && (nOptions & SDRSEARCH_WITHTEXT) !=0 && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
-        if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0)
+        if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0 && pPV)
         {
             if(!SdrObjectPrimitiveHit(*pObj, aPt, 0, *pPV, 0, true))
             {


More information about the Libreoffice-commits mailing list