oox/source/drawingml/fillproperties.cxx |    1 +
 svx/source/unodraw/XPropertyTable.cxx   |    1 +
 sw/source/uibase/dochdl/swdtflvr.cxx    |    5 +++++
 3 files changed, 7 insertions(+)

New commits:
commit e03603bcedf236c050173b921ab51db9aa8ce274
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Apr 22 21:48:38 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Apr 23 14:12:41 2023 +0200

    cid#1524676 try to convince coverity of the error of its ways
    
    and
    
    cid#1524745 Explicit null dereferenced
    
    Change-Id: Id2fb9cf6d0a71712533e14981a33490c578db597
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150818
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 963d5f6e449d..026a341e2c4d 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -613,6 +613,7 @@ void FillProperties::pushToPropMap(ShapePropertyMap& 
rPropMap, const GraphicHelp
                 sal_Int32 nEndTrans     = 0;
                 sal_Int32 nStartTrans   = 0;
                 awt::Gradient2 aGradient;
+                assert(aGradient.ColorStops.get() && "cid#1524676 
aGradient.ColorStops._pSequence won't be null here");
                 aGradient.Angle = 900;
                 aGradient.StartIntensity = 100;
                 aGradient.EndIntensity = 100;
diff --git a/svx/source/unodraw/XPropertyTable.cxx 
b/svx/source/unodraw/XPropertyTable.cxx
index a66f7e37b8f7..45b0cd39c1ed 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -534,6 +534,7 @@ uno::Any SvxUnoXGradientTable::getAny( const 
XPropertyEntry* pEntry ) const noex
 {
     const XGradient& aXGradient = static_cast<const 
XGradientEntry*>(pEntry)->GetGradient();
     awt::Gradient2 aGradient;
+    assert(aGradient.ColorStops.get() && "cid#1524745 
aGradient.ColorStops._pSequence won't be null here");
 
     // standard values
     aGradient.Style = aXGradient.GetGradientStyle();
commit 1597f3cf16aa6747c878a23f64669805d18e9c46
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Apr 22 21:46:53 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Apr 23 14:12:33 2023 +0200

    cid#1524747 Dereference null return value
    
    Change-Id: I08a3382287dd30a6cee84e93b3aa8a97db4c3a76
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150817
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 8966e6eebb15..201b7fa1b5d2 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3978,6 +3978,11 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
             // up to down, if the cursor is there in its last table row
             const SwSelBoxes& rBoxes = 
rSrcSh.GetTableCursor()->GetSelectedBoxes();
             const SwTableNode* pTableNd = rSh.IsCursorInTable();
+            if (!pTableNd)
+            {
+                SAL_WARN("sw", "presumably this case can't arise in practice");
+                return false;
+            }
             const SwTableLines& rLines = pTableNd->GetTable().GetTabLines();
             const SwStartNode& rDelPos = rBoxes.back()
                     ? *rBoxes.front()->GetSttNd()

Reply via email to