From 90fcfca02ce5deea7461e559a474de9bb19a8dd8 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Tue, 17 Oct 2017 10:15:53 +0200 Subject: Taxonomy: Don't access empty entries when printing the tags Signed-off-by: Stefan Fuchs --- core/divesite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) { -- cgit v1.2.3-70-g09d2