aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index 3c89e81e7..a754b0e79 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -147,6 +147,8 @@ void DivePlotDataModel::emitDataChanged()
void DivePlotDataModel::calculateDecompression()
{
struct dive *d = getDiveById(id());
+ if (!d)
+ return;
struct divecomputer *dc = select_dc(&d->dc);
init_decompression(d);
calculate_deco_information(d, dc, &pInfo, FALSE);