Index: trunk/src_plugins/mincut/rats_mincut.c =================================================================== --- trunk/src_plugins/mincut/rats_mincut.c (revision 26571) +++ trunk/src_plugins/mincut/rats_mincut.c (revision 26572) @@ -230,13 +230,17 @@ if (o->term != NULL) { pcb_subc_t *sc = pcb_obj_parent_subc(o); if (sc != NULL) { - pcb_net_term_t *t = pcb_net_find_by_refdes_term(&PCB->netlist[PCB_NETLIST_EDITED], sc->refdes, o->term); - if (t != NULL) { - if (t->parent.net == Snet) - gr_add_(g, n->gid, 0, 100000); - else if (t->parent.net == Tnet) - gr_add_(g, n->gid, 1, 100000); + if ((sc->refdes != NULL) && (o->term != NULL)) { + pcb_net_term_t *t = pcb_net_find_by_refdes_term(&PCB->netlist[PCB_NETLIST_EDITED], sc->refdes, o->term); + if (t != NULL) { + if (t->parent.net == Snet) + gr_add_(g, n->gid, 0, 100000); + else if (t->parent.net == Tnet) + gr_add_(g, n->gid, 1, 100000); + } } + else + pcb_message(PCB_MSG_WARNING, "Ignoring subcircuit %ld connecting to a net because it has no refdes;\nplease use the nonetlist flag on the subcircuit to suppress this warning\n", sc->ID); } }