diff --git a/src/db/db/built-in-macros/pcell_declaration_helper.lym b/src/db/db/built-in-macros/pcell_declaration_helper.lym index 30023a97a..43754b65d 100644 --- a/src/db/db/built-in-macros/pcell_declaration_helper.lym +++ b/src/db/db/built-in-macros/pcell_declaration_helper.lym @@ -408,7 +408,7 @@ module RBA # get the layer definitions def get_layers(parameters) - @layer_param_index.collect { |i| parameters[i] } + @layer_param_index.collect { |i| parameters[i] || RBA::LayerInfo::new } end # coerce parameters (make consistent) diff --git a/src/db/db/built-in-pymacros/pcell_declaration_helper.lym b/src/db/db/built-in-pymacros/pcell_declaration_helper.lym index 7e0b3f8fe..81ea44c44 100644 --- a/src/db/db/built-in-pymacros/pcell_declaration_helper.lym +++ b/src/db/db/built-in-pymacros/pcell_declaration_helper.lym @@ -430,7 +430,10 @@ class _PCellDeclarationHelper(pya.PCellDeclaration): """ layers = [] for i in self._layer_param_index: - layers.append(parameters[i]) + if parameters[i] is not None: + layers.append(parameters[i]) + else: + layers.append(pya.LayerInfo()) return layers def callback(self, layout, name, states): diff --git a/src/db/db/gsiDeclDbLibrary.cc b/src/db/db/gsiDeclDbLibrary.cc index dc8c6ed45..6dc75a636 100644 --- a/src/db/db/gsiDeclDbLibrary.cc +++ b/src/db/db/gsiDeclDbLibrary.cc @@ -263,7 +263,7 @@ static std::vector get_layer_declarations_native (const db: std::vector lp = pd->db::PCellDeclaration::get_layer_declarations (parameters); std::vector ret; for (std::vector::const_iterator l = lp.begin (); l != lp.end (); ++l) { - ret.push_back (db::LayerProperties(*l)); + ret.push_back (db::LayerProperties (*l)); } return ret; }