Avoid crash on bad chart.xml

An example reported at the users forum shows
lcoung can be negative leading to a crash.
This commit is contained in:
Alejandro Martinez
2026-04-04 11:38:08 -03:00
parent d313103e2f
commit efe680c9a5

View File

@@ -782,8 +782,7 @@ LTMPlot::setData(LTMSettings *set)
// we need to fill in the gaps sadly
int lcount = xdata[count];
if (lcount) {
if (lcount > 0) {
// calculated values
QVector<double> xtrend(lcount);
QVector<double> btrend(lcount);