Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 37957) +++ trunk/src_plugins/autoroute/autoroute.c (revision 37958) @@ -4098,7 +4098,9 @@ assert(!rb->flags.homeless); if (rb->conflicts_with && rb->parent.expansion_area->conflicts_with != rb->conflicts_with) vector_destroy(&rb->conflicts_with); - rnd_r_delete_entry_free_data(rd->layergrouptree[rb->group], &rb->box, free); + + if (rnd_rtree_delete(rd->layergrouptree[rb->group], &rb->box, (rnd_rtree_box_t *)&rb->box) == 0) + free(&rb->box); } vector_destroy(&area_vec); /* clean up; remove all 'source', 'target', and 'nobloat' flags */ @@ -4297,9 +4299,6 @@ LIST_LOOP(net, same_net, p); p->flags.is_bad = 0; if (!p->flags.fixed) { -#ifndef NDEBUG - rnd_bool del; -#endif assert(!p->flags.homeless); if (rip) { RemoveFromNet(p, NET); @@ -4313,13 +4312,8 @@ if (rip) { if (conf_core.editor.live_routing) ripout_livedraw_obj(p); -#ifndef NDEBUG - del = -#endif - rnd_r_delete_entry_free_data(rd->layergrouptree[p->group], &p->box, free); -#ifndef NDEBUG - assert(del); -#endif + if (rnd_rtree_delete(rd->layergrouptree[p->group], &p->box, (rnd_rtree_box_t *)&p->box) == 0) + free(&p->box); } else { p->flags.is_odd = AutoRouteParameters.is_odd; Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 37957) +++ trunk/src_plugins/autoroute/mtspace.c (revision 37958) @@ -147,7 +147,10 @@ /* the info box is pre-bloated, so just check equality */ if (box_->x1 == info->box.X1 && box_->x2 == info->box.X2 && box_->y1 == info->box.Y1 && box_->y2 == info->box.Y2 && box->clearance == info->clearance) { - rnd_r_delete_entry_free_data(info->tree, (rnd_box_t *)box_, free); + + if (rnd_rtree_delete(info->tree, (void *)box_, (rnd_rtree_box_t *)box_) == 0) + free((void *)box_); + longjmp(info->env, 1); } return rnd_RTREE_DIR_NOT_FOUND_CONT;