@@ -108,7 +108,7 QPointF DeclarativeXySeries::at(int index) | |||||
108 | { |
|
108 | { | |
109 | QXYSeries *series = qobject_cast<QXYSeries *>(xySeries()); |
|
109 | QXYSeries *series = qobject_cast<QXYSeries *>(xySeries()); | |
110 | Q_ASSERT(series); |
|
110 | Q_ASSERT(series); | |
111 |
if (index >= 0 |
|
111 | if (index >= 0 && index < series->count()) | |
112 | return series->points().at(index); |
|
112 | return series->points().at(index); | |
113 | return QPointF(0, 0); |
|
113 | return QPointF(0, 0); | |
114 | } |
|
114 | } |
General Comments 0
You need to be logged in to leave comments.
Login now