Fix segmentation fault on exporting picture depths
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d47191a3a6
commit
f70a83667b
@ -320,7 +320,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
|
||||
struct dive *dive;
|
||||
depth_t depth;
|
||||
int i;
|
||||
const char **unit = NULL;
|
||||
const char *unit = NULL;
|
||||
|
||||
struct membuffer buf = { 0 };
|
||||
|
||||
@ -336,7 +336,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
|
||||
depth.mm = s->depth.mm;
|
||||
s++;
|
||||
}
|
||||
put_format(&buf, "%s\t%.1f%s\n", picture->filename, get_depth_units(depth.mm, NULL, unit), *unit);
|
||||
put_format(&buf, "%s\t%.1f%s\n", picture->filename, get_depth_units(depth.mm, NULL, &unit), unit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user