tdf#141689 Fix crash in 'Central' moving avg function
Change-Id: I2dc5e517d5e3ff6283c9ff66c9f32ee95d66ef45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114121 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
parent
cf5cc42785
commit
a6066989f7
1 changed files with 3 additions and 2 deletions
|
@ -145,9 +145,10 @@ uno::Sequence< geometry::RealPoint2D > SAL_CALL MovingAverageRegressionCurveCalc
|
|||
const uno::Reference< chart2::XScaling >& /*xScalingY*/,
|
||||
sal_Bool /*bMaySkipPointsInCalculation*/ )
|
||||
{
|
||||
uno::Sequence< geometry::RealPoint2D > aResult( aYList.size() );
|
||||
size_t nSize = std::min(aXList.size(), aYList.size());
|
||||
uno::Sequence< geometry::RealPoint2D > aResult( nSize );
|
||||
|
||||
for( size_t i = 0; i < aYList.size(); ++i )
|
||||
for( size_t i = 0; i < nSize; ++i )
|
||||
{
|
||||
aResult[i].X = aXList[i];
|
||||
aResult[i].Y = aYList[i];
|
||||
|
|
Loading…
Reference in a new issue