Skip to content

Commit 02155e9

Browse files
committed
fixed: properly merge houses
1 parent 84eb270 commit 02155e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/building/building_house.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ void building_house::merge() {
429429
int tile_offset = base.tile.grid_offset() + house_tile_offsets(i);
430430
if (map_terrain_is(tile_offset, TERRAIN_BUILDING)) {
431431
auto other_house = building_at(tile_offset)->dcast_house();
432+
if (!other_house) {
433+
continue;
434+
}
435+
432436
if (other_house->id() == base.id) {
433437
num_house_tiles++;
434438
} else if (other_house->state() == BUILDING_STATE_VALID && other_house->runtime_data().hsize

0 commit comments

Comments
 (0)