mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix crash with empty dive list
Don't access current_dc unless there is a valid current_dive. Fixes #817 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b8b15165f0
commit
d9fd4cb69b
1 changed files with 1 additions and 1 deletions
|
@ -981,7 +981,7 @@ void ProfileWidget2::setProfileState()
|
|||
po2GasItem->setVisible(prefs.pp_graphs.po2);
|
||||
pheGasItem->setVisible(prefs.pp_graphs.phe);
|
||||
|
||||
bool setpointflag = (current_dc->divemode == CCR) && prefs.pp_graphs.po2 && current_dive;
|
||||
bool setpointflag = current_dive && (current_dc->divemode == CCR) && prefs.pp_graphs.po2;
|
||||
bool sensorflag = setpointflag && prefs.show_ccr_sensors;
|
||||
o2SetpointGasItem->setVisible(setpointflag && prefs.show_ccr_setpoint);
|
||||
ccrsensor1GasItem->setVisible(sensorflag);
|
||||
|
|
Loading…
Add table
Reference in a new issue