mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Temporary dive + temporary site = crash
We always thought that a dive had a dive site and that a dive really exists. but if we go to add dive and then go to add dive site, none of those exist yet and then we got a crash. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ed20b004a8
commit
dd5e221388
1 changed files with 2 additions and 0 deletions
2
dive.h
2
dive.h
|
@ -624,6 +624,8 @@ static inline bool dive_site_has_gps_location(struct dive_site *ds)
|
|||
|
||||
static inline int dive_has_gps_location(struct dive *dive)
|
||||
{
|
||||
if (!dive)
|
||||
return false;
|
||||
return dive_site_has_gps_location(get_dive_site_by_uuid(dive->dive_site_uuid));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue