From 3e1a815a432d320bf52bdd490221def2c09efb33 2012-06-04 06:48:13 From: sauimone Date: 2012-06-04 06:48:13 Subject: [PATCH] fix barseries remove return value with empty list --- diff --git a/src/barchart/qbarseries.cpp b/src/barchart/qbarseries.cpp index 26c14b2..e5e06f1 100644 --- a/src/barchart/qbarseries.cpp +++ b/src/barchart/qbarseries.cpp @@ -607,6 +607,9 @@ bool QBarSeriesPrivate::append(QList sets) bool QBarSeriesPrivate::remove(QList sets) { Q_Q(QBarSeries); + if (sets.count() == 0) { + return false; + } foreach (QBarSet* set, sets) { if ((set == 0) || (!m_barSets.contains(set))) { // Fail if any of the sets is null or is not in series