From f70a83667b6e7f2e7cebcc010d526ee0dd1b3512 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 25 Jan 2015 16:47:50 +0200 Subject: Fix segmentation fault on exporting picture depths Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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); } } -- cgit v1.2.3-70-g09d2