This guard is unnecessary since `graph_cleanup` alrady has the
necessary guards. This also ensures that the Agraphinfo_t record and
the graph's label is cleaned away even if the graph for some reason
doesn't have a drawing (can this ever happen?).
* Free layout resources.
* First, if the graph has a layout-specific cleanup function attached,
* use it and reset.
- * Then, if the graph has a drawing, do the general graph cleanup.
+ * Then do the general graph cleanup.
*/
int gvFreeLayout(GVC_t * gvc, Agraph_t * g)
{
GD_cleanup(g) = NULL;
}
- if (GD_drawing(g)) {
- graph_cleanup(g);
- }
+ graph_cleanup(g);
return 0;
}