From cbb3167166a1e8088f7889027552afba9b71b54b Mon Sep 17 00:00:00 2001 From: nordsoft Date: Sun, 5 Mar 2023 00:20:47 +0400 Subject: [PATCH] Regression fix --- mapeditor/maphandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapeditor/maphandler.cpp b/mapeditor/maphandler.cpp index 0df7b091a..423fd71f6 100644 --- a/mapeditor/maphandler.cpp +++ b/mapeditor/maphandler.cpp @@ -118,7 +118,7 @@ void MapHandler::drawRoad(QPainter & painter, int x, int y, int z) auto & tinfo = map->getTile(int3(x, y, z)); auto * tinfoUpper = map->isInTheMap(int3(x, y - 1, z)) ? &map->getTile(int3(x, y - 1, z)) : nullptr; - if(tinfoUpper && tinfoUpper->roadType->getId() != Road::NO_ROAD) + if(tinfoUpper && tinfoUpper->roadType) { auto roadName = tinfoUpper->roadType->getJsonKey(); QRect source(0, tileSize / 2, tileSize, tileSize / 2); @@ -130,7 +130,7 @@ void MapHandler::drawRoad(QPainter & painter, int x, int y, int z) } } - if(tinfo.roadType->getId() != Road::NO_ROAD) //print road from this tile + if(tinfo.roadType) //print road from this tile { auto roadName = tinfo.roadType->getJsonKey();; QRect source(0, 0, tileSize, tileSize / 2);