[PATCH 1/2] Fix segmentation fault on exporting picture depths
Miika Turkia
miika.turkia at gmail.com
Sun Jan 25 06:47:50 PST 2015
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
qt-ui/divelogexportdialog.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index 0193ea5..a747932 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);
}
}
--
1.9.1
More information about the subsurface
mailing list