ignore uninitialized Rectangle 1-8

This commit is contained in:
2025-08-09 20:27:21 -05:00
parent 18d80d9fc0
commit 73fa5fc874
2 changed files with 2 additions and 1 deletions

View File

@@ -1466,6 +1466,7 @@ void handle_one_minimap_event(const sf::Event& event) {
// Area rectangle hovered
const std::vector<info_rect_t>& area_desc = is_out() ? univ.out->area_desc : univ.town->area_desc;
for(info_rect_t area : area_desc){
if(area.empty()) continue;
if(area.contains(tile)){
tooltip_text += area.descr + " |";
}

View File

@@ -1454,7 +1454,7 @@ void draw_map(bool need_refresh, std::string tooltip_text) {
info_rect_t area = area_desc[i];
rectangle& known_bounds = known_area_rects[i];
// tile is in an area rectangle. see if it extends the party's known bounds of the area
if(area.contains(where) && !is_blocked(real_where, false)){
if(!area.empty() && area.contains(where) && !is_blocked(real_where, false)){
if(where.x < known_bounds.left) known_bounds.left = where.x;
if(where.y < known_bounds.top) known_bounds.top = where.y;
if(where.x + 1 > known_bounds.right) known_bounds.right = where.x + 1;