summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 7353cb14e..cd28a87bc 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -566,8 +566,10 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
#endif
if (currentState != ADD && currentState != PLAN) {
if (!d) {
- if (!current_dive)
+ if (!current_dive) {
+ setEmptyState();
return;
+ }
d = current_dive; // display the current dive
}