diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-10-17 10:15:53 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-10-17 06:12:07 -0400 |
commit | 90fcfca02ce5deea7461e559a474de9bb19a8dd8 (patch) | |
tree | 6771dde5d6f4fc8108f4a1f31c708ad752a232d4 /core/divesite.cpp | |
parent | 884e690049f091f43567d6bf77634463af14cd93 (diff) | |
download | subsurface-90fcfca02ce5deea7461e559a474de9bb19a8dd8.tar.gz |
Taxonomy: Don't access empty entries when printing the tags
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/divesite.cpp')
-rw-r--r-- | core/divesite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/divesite.cpp b/core/divesite.cpp index 0f0641c28..56030afd1 100644 --- a/core/divesite.cpp +++ b/core/divesite.cpp @@ -32,7 +32,7 @@ QString constructLocationTags(struct dive_site *ds, bool for_maintab) for (int i = 0; i < 3; i++) { if (prefs.geocoding.category[i] == TC_NONE) continue; - for (int j = 0; j < TC_NR_CATEGORIES; j++) { + for (int j = 0; j < ds->taxonomy.nr; j++) { if (ds->taxonomy.category[j].category == prefs.geocoding.category[i]) { QString tag = ds->taxonomy.category[j].value; if (!tag.isEmpty()) { |