diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-03 07:50:30 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-03 07:50:30 -0800 |
commit | 3fab68dcd3689d795248dfc5bb0c98b72b424252 (patch) | |
tree | fa0496d3d0d98a7a806a86075808bda13d0475f1 /qt-ui/profile/diveeventitem.cpp | |
parent | 9eb55a0fc6b13dfd608009cac275bdbbbb71592c (diff) | |
download | subsurface-3fab68dcd3689d795248dfc5bb0c98b72b424252.tar.gz |
Fix two more potential crashes for dives without samples
This should be all of them (famous last words).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveeventitem.cpp')
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index cceaaa5e7..38f359908 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -131,7 +131,7 @@ bool DiveEventItem::shouldBeHidden() * Don't bother showing those */ struct sample *first_sample = &get_dive_dc(&displayed_dive, dc_number)->sample[0]; - if (!strcmp(event->name, "gaschange") && event->time.seconds == first_sample->time.seconds) + if (!strcmp(event->name, "gaschange") && first_sample && event->time.seconds == first_sample->time.seconds) return true; for (int i = 0; i < evn_used; i++) { |