diff options
author | 2013-02-14 09:47:15 -0800 | |
---|---|---|
committer | 2013-02-14 09:47:15 -0800 | |
commit | 869edfbe39c7134a2d3615fd0010ede7e5d557ac (patch) | |
tree | 43e80caa95ca3a911558f28c1d68b85a78c82197 /statistics.c | |
parent | adf135ad38f0a9e2c279f3066f7fad20a2f364b1 (diff) | |
parent | 23cfd907dea74dd8e4c8bbf93c8c3f598868623e (diff) | |
download | subsurface-869edfbe39c7134a2d3615fd0010ede7e5d557ac.tar.gz |
Merge branch 'airtemp-fix'
Diffstat (limited to 'statistics.c')
-rw-r--r-- | statistics.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/statistics.c b/statistics.c index d87353b7f..fdea8bdba 100644 --- a/statistics.c +++ b/statistics.c @@ -574,7 +574,12 @@ static void show_single_dive_stats(struct dive *dive) value = get_temp_units(dc->airtemp.mkelvin, &unit); set_label(single_w.air_temp, "%.1f %s", value, unit); } else { - set_label(single_w.air_temp, ""); + if (dive->airtemp.mkelvin) { + value = get_temp_units(dive->airtemp.mkelvin, &unit); + set_label(single_w.air_temp, "%.1f %s", value, unit); + } else { + set_label(single_w.air_temp, ""); + } } mbar = dc->surface_pressure.mbar; /* it would be easy to get dive data here: |