Skip to content

Commit 84f8678

Browse files
author
Osama
committed
Merge remote-tracking branch 'osama/odb-guarded-getters' into TR-lef58-area-marker
2 parents 5eb7751 + 87681c9 commit 84f8678

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/odb/src/db/dbMetalWidthViaMap.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ bool dbMetalWidthViaMap::isPgVia() const
209209
dbTechLayer* dbMetalWidthViaMap::getCutLayer() const
210210
{
211211
_dbMetalWidthViaMap* obj = (_dbMetalWidthViaMap*) this;
212+
if (!obj->cut_layer_.isValid()) {
213+
return nullptr;
214+
}
212215
dbTech* tech = (dbTech*) obj->getOwner();
213216
return dbTechLayer::getTechLayer(tech, obj->cut_layer_);
214217
}

src/odb/src/db/dbTechLayerAreaRule.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ void dbTechLayerAreaRule::setTrimLayer(dbTechLayer* trim_layer)
276276
dbTechLayer* dbTechLayerAreaRule::getTrimLayer() const
277277
{
278278
_dbTechLayerAreaRule* obj = (_dbTechLayerAreaRule*) this;
279+
if (!obj->trim_layer_.isValid()) {
280+
return nullptr;
281+
}
279282
odb::dbTech* tech = getDb()->getTech();
280283
return odb::dbTechLayer::getTechLayer(tech, obj->trim_layer_);
281284
}

0 commit comments

Comments
 (0)