diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-01-25 16:47:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-25 07:18:11 -0800 |
commit | f70a83667b6e7f2e7cebcc010d526ee0dd1b3512 (patch) | |
tree | 94472652f8de0278fc036e925d124b96d29ebbaf /qt-ui | |
parent | d47191a3a696acfe61799f09beaa5a34c2e0e772 (diff) | |
download | subsurface-f70a83667b6e7f2e7cebcc010d526ee0dd1b3512.tar.gz |
Fix segmentation fault on exporting picture depths
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogexportdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index 0193ea5d9..a747932ac 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -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); } } |