[region] Remove element only after processing

Now that we cannot rely on the next_node element. We must finish processing the
entry before removing it. Easiest way is to recurse and remove after return.
This commit is contained in:
Charlie Brej 2009-11-22 22:53:12 +00:00
parent b7c34f1857
commit 9df80dc483

View file

@ -283,9 +283,10 @@ merge_rectangle_with_sub_list (ply_region_t *region,
* NNNNNNN
*/
case PLY_RECTANGLE_OVERLAP_ALL_EDGES:
merge_rectangle_with_sub_list (region, new_area, next_node);
free (old_area);
ply_list_remove_node (region->rectangle_list, node);
break;
return;
/* NNN We need to split the new rectangle into
* ONNNO two rectangles: the top and bottom row of Ns