mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Check "hasDCSalinity" is null in updateWaterTypeWidget()
Signed-off-by: Rafael M. Salvioni <rafael.salvioni@gmail.com>
This commit is contained in:
parent
5511cd13d7
commit
8f8f901aa8
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ void TabDiveInformation::closeWarning()
|
|||
void TabDiveInformation::updateWaterTypeWidget()
|
||||
{
|
||||
// Decide on whether to show the water type/salinity combobox or not
|
||||
bool hasDCSalinity = parent.currentDive->salinity != 0;
|
||||
bool hasDCSalinity = parent.currentDive && parent.currentDive->salinity != 0;
|
||||
if (prefs.salinityEditDefault || !hasDCSalinity) { // if the preference setting has been checked or DC doesnt have salinity info
|
||||
ui->waterTypeText->setVisible(false);
|
||||
ui->waterTypeCombo->setVisible(true); // show combobox
|
||||
|
|
Loading…
Reference in a new issue