mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Profile: Fix crash on addition of dive to fresh logbook
If there is no current dive, the macro current_dc returns NULL. This led to a null-pointer dereference. Reported-by: Martin Měřinský <mermar@centrum.cz> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
12e4b6d62c
commit
fb84b11854
1 changed files with 1 additions and 1 deletions
|
@ -1201,7 +1201,7 @@ void ProfileWidget2::setProfileState()
|
|||
ccrsensor1GasItem->setVisible(sensorflag);
|
||||
ccrsensor2GasItem->setVisible(sensorflag && (current_dc->no_o2sensors > 1));
|
||||
ccrsensor3GasItem->setVisible(sensorflag && (current_dc->no_o2sensors > 2));
|
||||
ocpo2GasItem->setVisible((current_dc->divemode == PSCR) && prefs.show_scr_ocpo2);
|
||||
ocpo2GasItem->setVisible(current_dive && (current_dc->divemode == PSCR) && prefs.show_scr_ocpo2);
|
||||
|
||||
heartBeatItem->setVisible(prefs.hrgraph);
|
||||
diveCeiling->setVisible(prefs.calcceiling);
|
||||
|
|
Loading…
Add table
Reference in a new issue