diff --git a/src/map/imgmap.cpp b/src/map/imgmap.cpp index c7e3d4ec..695923e1 100644 --- a/src/map/imgmap.cpp +++ b/src/map/imgmap.cpp @@ -428,12 +428,13 @@ void IMGMap::processShields(QList &lines, const QRect &tileRect, map.insert(l.length(), j); } + QMap::const_iterator jt = map.constBegin(); + TextPointItem *item = new TextPointItem( - p.at(map.first()).toPoint(), &(sp.value(it.key())->text()), + p.at(jt.value()).toPoint(), &(sp.value(it.key())->text()), poiFont(), 0, &shieldColor, shieldBgColor(it.key().type())); bool valid = false; - QMap::const_iterator jt = map.constBegin(); while (true) { if (!item->collides(textItems) && tileRect.contains(item->boundingRect().toRect())) {