Taxonomy: Don't access empty entries when printing the tags

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-10-17 10:15:53 +02:00 committed by Dirk Hohndel
parent 884e690049
commit 90fcfca02c

View file

@ -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()) {