Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 20155) +++ trunk/src/data.c (revision 20156) @@ -181,6 +181,8 @@ for (layer = data->Layer, i = 0; i < PCB_MAX_LAYER; layer++, i++) free((char *)layer->name); + htip_uninit(&data->id2obj); + memset(data, 0, sizeof(pcb_data_t)); } @@ -362,6 +364,7 @@ void pcb_data_init(pcb_data_t *data) { memset(data, 0, sizeof(pcb_data_t)); + htip_init(&data->id2obj, longhash, longkeyeq); } pcb_data_t *pcb_data_new(pcb_board_t *parent) Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 20155) +++ trunk/src/data.h (revision 20156) @@ -41,10 +41,12 @@ #include "obj_subc_list.h" #include "obj_pstk_list.h" #include "vtpadstack.h" +#include /* Generic container object that can hold subcircuits with layer-global objects (e.g. vias and rats) and layer-locals (lines, arcs) */ struct pcb_data_s { + htip_t id2obj; /* long object ID -> (pcb_any_obj_t *) */ int LayerN; /* number of layers in this board */ pcb_vtpadstack_proto_t ps_protos;