summaryrefslogtreecommitdiffstats
path: root/subsurface-core/dive.h
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-03-15 21:31:59 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-16 07:46:28 -0700
commit8a59d78faa4792934a11a774c9dffcd85f0c3340 (patch)
tree5d38fc9d40712e2314759ff05ff0c0b58145fee6 /subsurface-core/dive.h
parent3c7e14a18fdc2ee9590e591afe4761a2d93881e7 (diff)
downloadsubsurface-8a59d78faa4792934a11a774c9dffcd85f0c3340.tar.gz
When handing off a picture to a worker thread, copy it first
as otherwise we crash when the picture is freed before the worker thread (to load from the net or to compute hashes) is finished Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.h')
-rw-r--r--subsurface-core/dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h
index 74f55ee81..484a67f8a 100644
--- a/subsurface-core/dive.h
+++ b/subsurface-core/dive.h
@@ -376,6 +376,7 @@ struct picture {
for (struct picture *picture = (_divestruct).picture_list; picture; picture = picture->next)
extern struct picture *alloc_picture();
+extern struct picture *clone_picture(struct picture *src);
extern bool dive_check_picture_time(struct dive *d, int shift_time, timestamp_t timestamp);
extern void dive_create_picture(struct dive *d, char *filename, int shift_time, bool match_all);
extern void dive_add_picture(struct dive *d, struct picture *newpic);
@@ -385,6 +386,7 @@ extern bool picture_check_valid(char *filename, int shift_time);
extern void picture_load_exif_data(struct picture *p);
extern timestamp_t picture_get_timestamp(char *filename);
extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic);
+extern void picture_free(struct picture *picture);
extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc);
extern int get_depth_at_time(struct divecomputer *dc, unsigned int time);