blargh, of course wrong file. Here is the correct one. 2015-03-16 19:54 GMT+01:00 Jan Darowski <jan.darow...@gmail.com>: > I will fix this warning on widgets startup, it can be ignored. > > The problem with segfault seems to appear when there is no dive site > specified but picture has some gps coordinates (it's strange that no > one noticed it before, it's an old issue). > Here is the patch. I checked it with hand made exif data. Please, see > if it helps, there can be more wild pointers in the neighborhood. > > 2015-03-16 19:11 GMT+01:00 Willem Ferguson <willemfergu...@zoology.up.ac.za>: >> On 16/03/2015 19:11, Pedro Neves wrote: >> >> Hi all: >> >> >> Also, after I download a dive from my dive computer (Uwatec Tec 2G), I'm >> trying to insert the information for the dive site. I write the name of the >> site and press manage. >> On the divesite dialog, all fields are empty. I insert the information (name >> and coordinates) When I press "Apply changes". >> I get back to the notes tab. The location field has the name of my dive >> site (in yellow). I press "Apply changes" changes, but the divesite doesn't >> show up on the map, and if I select another dive, the location I've just >> inserted disapears. >> >> The same happens if I try all this with a new logbook. >> >> >> I'm using Debian/Sid... >> >> Cheers: >> >> Pedro >> >> See # 854 >> willem >> >> >> _______________________________________________ >> subsurface mailing list >> subsurface@subsurface-divelog.org >> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface >>
From 36bfb9a7303748caf6da3cf747a029476d971460 Mon Sep 17 00:00:00 2001 From: Jan Darowski <jan.darow...@gmail.com> Date: Mon, 16 Mar 2015 19:48:55 +0100 Subject: [PATCH] Fixed dive_set_geodata_from_picture segfault.
Segfault did appear when picture had some gps coordinates but there was no dive site assigned to the dive. Signed-off-by: Jan Darowski <jan.darow...@gmail.com> --- dive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dive.c b/dive.c index afa38e4..ce682bc 100644 --- a/dive.c +++ b/dive.c @@ -2951,7 +2951,7 @@ unsigned int dive_get_picture_count(struct dive *d) void dive_set_geodata_from_picture(struct dive *d, struct picture *pic) { struct dive_site *ds = get_dive_site_by_uuid(d->dive_site_uuid); - if (!dive_site_has_gps_location(ds) && (pic->latitude.udeg || pic->longitude.udeg)) { + if (ds && !dive_site_has_gps_location(ds) && (pic->latitude.udeg || pic->longitude.udeg)) { ds->latitude = pic->latitude; ds->longitude = pic->longitude; } -- 2.2.2
_______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface