diff options
Diffstat (limited to 'core/divesite.c')
-rw-r--r-- | core/divesite.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/divesite.c b/core/divesite.c index 437605b71..163ecc892 100644 --- a/core/divesite.c +++ b/core/divesite.c @@ -145,13 +145,15 @@ int nr_of_dives_at_dive_site(struct dive_site *ds, bool select_only) return nr; } -bool is_dive_site_used(uint32_t uuid, bool select_only) +bool is_dive_site_used(struct dive_site *ds, bool select_only) { int j; bool found = false; struct dive *d; + if (!ds) + return false; for_each_dive(j, d) { - if (d->dive_site_uuid == uuid && (!select_only || d->selected)) { + if (d->dive_site_uuid == ds->uuid && (!select_only || d->selected)) { found = true; break; } |