mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make handling of empty airconsumption string consistent
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4564d67953
commit
6911229278
2 changed files with 3 additions and 1 deletions
2
info.c
2
info.c
|
@ -197,6 +197,8 @@ void update_air_info(char *buffer)
|
||||||
{
|
{
|
||||||
char markup[120];
|
char markup[120];
|
||||||
|
|
||||||
|
if (! buffer)
|
||||||
|
buffer = EMPTY_AIRCONSUMPTION;
|
||||||
snprintf(markup, sizeof(markup), "<span font=\"8\">%s</span>",buffer);
|
snprintf(markup, sizeof(markup), "<span font=\"8\">%s</span>",buffer);
|
||||||
gtk_label_set_markup(GTK_LABEL(airconsumption), markup);
|
gtk_label_set_markup(GTK_LABEL(airconsumption), markup);
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,7 +504,7 @@ static void plot_info(struct dive *dive, struct graphics_context *gc)
|
||||||
|
|
||||||
airuse = calculate_airuse(dive);
|
airuse = calculate_airuse(dive);
|
||||||
if (!airuse) {
|
if (!airuse) {
|
||||||
update_air_info(" \n ");
|
update_air_info(NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (output_units.volume) {
|
switch (output_units.volume) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue