Index: obj_rat.c =================================================================== --- obj_rat.c (revision 37942) +++ obj_rat.c (revision 37943) @@ -117,7 +117,7 @@ Line->group2 = group2; pcb_line_bbox((pcb_line_t *) Line); if (!Data->rat_tree) - Data->rat_tree = rnd_r_create_tree(); + rnd_rtree_init(Data->rat_tree = malloc(sizeof(rnd_rtree_t))); rnd_rtree_insert(Data->rat_tree, Line, (rnd_rtree_box_t *)Line); if (anchor1 != NULL) @@ -349,7 +349,7 @@ PCB_FLAG_CLEAR(PCB_FLAG_FOUND, rat); if (!ctx->buffer.dst->rat_tree) - ctx->buffer.dst->rat_tree = rnd_r_create_tree(); + rnd_rtree_init(ctx->buffer.dst->rat_tree = malloc(sizeof(rnd_rtree_t))); rnd_rtree_insert(ctx->buffer.dst->rat_tree, rat, (rnd_rtree_box_t *)rat); return rat;