[Libreoffice-commits] core.git: vcl/headless vcl/opengl vcl/qt5 vcl/quartz vcl/skia vcl/unx vcl/win
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 10 10:30:53 UTC 2020
vcl/headless/svpgdi.cxx | 1 +
vcl/opengl/gdiimpl.cxx | 1 +
vcl/qt5/Qt5Graphics_GDI.cxx | 1 +
vcl/quartz/salgdicommon.cxx | 1 +
vcl/skia/gdiimpl.cxx | 1 +
vcl/unx/generic/gdi/gdiimpl.cxx | 1 +
vcl/win/gdi/gdiimpl.cxx | 1 +
7 files changed, 7 insertions(+)
New commits:
commit 89150f1bcbb71c0cc505bed1547ee0526ace3b2c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Feb 9 19:32:49 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 10 11:30:16 2020 +0100
cid#1458168 silence bogus Dereference after null check
and
cid#1458166 Dereference after null check
cid#1458167 Dereference after null check
Change-Id: I68dc7dc1bc78ed64795d353d5d0ffc15cc46b0c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88347
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index b47f1a9072a5..cd59eee1af16 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1321,6 +1321,7 @@ bool SvpSalGraphics::drawPolyLine(
// MM01 need to do line dashing as fallback stuff here now
const double fDotDashLength(nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
// MM01 decide if to stroke directly
static bool bDoDirectCairoStroke(true);
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 12eb4d8a800c..4a4a19c89600 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1656,6 +1656,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
// MM01 need to do line dashing as fallback stuff here now
const double fDotDashLength(nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
basegfx::B2DPolyPolygon aPolyPolygonLine;
if(bStrokeUsed)
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 53e4282d073e..38866ae96320 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -345,6 +345,7 @@ bool Qt5Graphics::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice,
const double fDotDashLength(
nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
basegfx::B2DPolyPolygon aPolyPolygonLine;
if (bStrokeUsed)
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index c16af4f223e5..a526790bb907 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -849,6 +849,7 @@ bool AquaSalGraphics::drawPolyLine(
// MM01 need to do line dashing as fallback stuff here now
const double fDotDashLength(nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
basegfx::B2DPolyPolygon aPolyPolygonLine;
if(bStrokeUsed)
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index dd7431a2662b..12265418c617 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -726,6 +726,7 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDev
const double fDotDashLength(
nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
basegfx::B2DPolyPolygon aPolyPolygonLine;
if (bStrokeUsed)
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 98f907cb2370..ddbf68cda3d1 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -1688,6 +1688,7 @@ bool X11SalGraphicsImpl::drawPolyLine(
// MM01 need to do line dashing as fallback stuff here now
const double fDotDashLength(nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
if(pSystemDependentData_Triangulation)
{
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 4e330d5df0fe..f15f13a94370 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2307,6 +2307,7 @@ bool WinSalGraphicsImpl::drawPolyLine(
// MM01 need to do line dashing as fallback stuff here now
const double fDotDashLength(nullptr != pStroke ? std::accumulate(pStroke->begin(), pStroke->end(), 0.0) : 0.0);
const bool bStrokeUsed(0.0 != fDotDashLength);
+ assert(!bStrokeUsed || (bStrokeUsed && pStroke));
if(pSystemDependentData_GraphicsPath)
{
More information about the Libreoffice-commits
mailing list