Skip to content
Permalink
Browse files

qgsdatadefinedsizelegend.cpp: avoid likely false positive cppcheck wa…

…rning about out-of-bounds access
  • Loading branch information
rouault authored and nyalldawson committed Nov 9, 2020
1 parent 4587c4e commit 33b19097636c28b8f709e3d475f6cee3eb05ca3d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsdatadefinedsizelegend.cpp
@@ -240,7 +240,7 @@ void QgsDataDefinedSizeLegend::drawCollapsedLegend( QgsRenderContext &context, Q
// but we need to avoid overlapping texts, so adjust the vertical positions
double middleIndex = 0; // classes.count() / 2; // will get the ideal position
QList<double> textCenterY;
double lastY = symbolTopY[middleIndex];
double lastY = middleIndex < symbolTopY.size() ? symbolTopY[middleIndex] : 0;
textCenterY << lastY;
for ( int i = middleIndex + 1; i < classes.count(); ++i )
{

0 comments on commit 33b1909

Please sign in to comment.
You can’t perform that action at this time.