Index: src/libcschem/compile.c =================================================================== --- src/libcschem/compile.c (revision 10332) +++ src/libcschem/compile.c (revision 10333) @@ -341,7 +341,7 @@ long n; for(n = 0; n < grp->aid.used; n++) { csch_aport_t *aport = htip_get(&dst->aid2obj, grp->aid.array[n]); - if (aport->hdr.type == CSCH_ATYPE_PORT) { + if ((aport != NULL) && (aport->hdr.type == CSCH_ATYPE_PORT)) { if (strcmp(aport->name, port_name) == 0) return aport; }