Index: abstract.c =================================================================== --- abstract.c (revision 3332) +++ abstract.c (revision 3333) @@ -155,14 +155,23 @@ { csch_aport_t *port; - port = htsp_get(&comp->ports, name); - if ((port != NULL) || (!alloc)) - return port; + if (comp != NULL) { + port = htsp_get(&comp->ports, name); + if ((port != NULL) || (!alloc)) + return port; + } + else { + TODO("hierarchic: we probably need a per sheet hash of terminals"); + } port = calloc(sizeof(csch_aport_t), 1); csch_aobj_init(abs, &port->hdr, CSCH_ATYPE_PORT); port->name = rnd_strdup(name); - htsp_set(&comp->ports, port->name, port); + + if (comp != NULL) + htsp_set(&comp->ports, port->name, port); + else + TODO("hierarchic: we probably need a per sheet hash of terminals"); return port; }