##// END OF EJS Templates
Fix crash with empty BarSet values...
Joni Poikelin -
r2869:8f454d1f8b44
parent child
Show More
@@ -69,7 +69,7 void DeclarativeBarSet::setValues(QVariantList values)
69 while (count())
69 while (count())
70 remove(count() - 1);
70 remove(count() - 1);
71
71
72 if (values.at(0).canConvert(QVariant::Point)) {
72 if (values.count() > 0 && values.at(0).canConvert(QVariant::Point)) {
73 // Create list of values for appending if the first item is Qt.point
73 // Create list of values for appending if the first item is Qt.point
74 int maxValue = 0;
74 int maxValue = 0;
75 for (int i = 0; i < values.count(); i++) {
75 for (int i = 0; i < values.count(); i++) {
General Comments 0
You need to be logged in to leave comments. Login now