diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 4ecf7a9a8..4f3655b12 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -53,6 +53,8 @@ bool intLessThan(int a, int b) } void DivePlannerPointsModel::removeSelectedPoints(const QVector &rows) { + if (!rows.count()) + return; int firstRow = rowCount() - rows.count(); QVector v2 = rows; std::sort(v2.begin(), v2.end(), intLessThan);