Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ring630 committed Aug 28, 2024
1 parent ce74369 commit 5ff5fbe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pyedb/dotnet/edb_core/cell/primitive/primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ def net_name(self, name):
@property
def layer(self):
"""Get the primitive edb layer object."""
layer_name = self._edb_object.GetLayer().GetName()
return self._pedb.stackup.find_layer_by_name(layer_name)
obj = self._edb_object.GetLayer()
if obj.IsNull():
return None
else:
return self._pedb.stackup.find_layer_by_name(obj.GetName())

@property
def layer_name(self):
Expand Down

0 comments on commit 5ff5fbe

Please sign in to comment.