mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:13:23 +00:00
Prevent a tank from looking undefined by mistake
If we have no default cylidner set and get no data about an air tank from libdivecomputer, our cylinder will look completely empty by mistake. Always setting some kind of description fixes that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f39962469d
commit
47dd0a1ec5
1 changed files with 3 additions and 0 deletions
|
@ -107,6 +107,9 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
|
|||
* dive computer, fill in the default tank information (if set) */
|
||||
fill_default_cylinder(&dive->cylinder[i]);
|
||||
}
|
||||
/* whatever happens, make sure there is a name for the cylidner */
|
||||
if (same_string(dive->cylinder[i].type.description, ""))
|
||||
dive->cylinder[i].type.description = strdup(translate("gettextFromC", "unknown"));
|
||||
}
|
||||
return DC_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue