summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 7fa1a8783..4ff6894e6 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -45,7 +45,9 @@ QString dpGasToStr(const divedatapoint& p)
QColor getColor(const color_indice_t i)
{
- return profile_color[i].at(0);
+ if ( profile_color.count() > i && i >= 0)
+ return profile_color[i].at(0);
+ return QColor(Qt::black);
}
static DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();