diff options
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 89501fc07..078d59ca9 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -91,8 +91,8 @@ void MainTab::updateDiveInfo(int dive) ui->rating->setCurrentStars(d->rating); else ui->rating->setCurrentStars(0); - ui->maximumDepthText->setText(get_depth_string(d->maxdepth, TRUE)); - ui->averageDepthText->setText(get_depth_string(d->meandepth, TRUE)); + ui->maximumDepthText->setText(d ? get_depth_string(d->maxdepth, TRUE) : ""); + ui->averageDepthText->setText(d ? get_depth_string(d->meandepth, TRUE) : ""); sacVal.mliter = d ? d->sac : 0; ui->sacText->setText(get_volume_string(sacVal, TRUE).append("/min")); ui->otuText->setText(QString("%1").arg( d ? d->otu : 0)); |