on xenial help sign in
exit loop once there's no point in continuing
commit8efbd794370510aff15c67e1be3654fe5d8f2d27 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 1 Oct 2014, 10:39 (12 years ago) parent3f3f854
1 file changed+1−1
plugins/Ubuntu/Gestures/DirectionalDragArea.cpp+1−1
plugins/Ubuntu/Gestures/DirectionalDragArea.cpp+1−1
@@ -404,7 +404,7 @@ void DirectionalDragArea::touchEvent_absent(QTouchEvent *event)
404404 const QList<QTouchEvent::TouchPoint> &touchPoints = event->touchPoints();
405405
406406 const QTouchEvent::TouchPoint *newTouchPoint = nullptr;
407− for (int i = 0; i < touchPoints.count(); ++i) {
407+ for (int i = 0; i < touchPoints.count() && allGood; ++i) {
408408 const QTouchEvent::TouchPoint &touchPoint = touchPoints.at(i);
409409 if (touchPoint.state() == Qt::TouchPointPressed) {
410410 if (newTouchPoint) {