mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: fix div-by-zero when selecting multiple invalid dives
Signed-off-by: Tim Segers <tsegers@pm.me>
This commit is contained in:
parent
f3a02d7049
commit
b618d93241
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ void TabDiveStatistics::updateData()
|
|||
stats_t stats_selection;
|
||||
calculate_stats_selected(&stats_selection);
|
||||
clear();
|
||||
if (amount_selected > 1) {
|
||||
if (amount_selected > 1 && stats_selection.selection_size >= 1) {
|
||||
ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
|
||||
ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
|
||||
ui->depthLimits->setAverage(get_depth_string(stats_selection.combined_max_depth.mm / stats_selection.selection_size, true));
|
||||
|
|
Loading…
Add table
Reference in a new issue