]> granicus.if.org Git - graphviz/commitdiff
agdelete should't check graph/subgraph of nodes and edges any more.
authornorth <devnull@localhost>
Thu, 16 Apr 2009 18:40:04 +0000 (18:40 +0000)
committernorth <devnull@localhost>
Thu, 16 Apr 2009 18:40:04 +0000 (18:40 +0000)
nodes and edges are universal now. actual membership is checked in
the delete function of each graph object type anyway.

lib/cgraph/obj.c

index a34d8d31b7057add9b3bc4dbd98b323df1997574..8f2428a213d695a2a85aa7eade4cbf0afcd56324 100755 (executable)
 
 int agdelete(Agraph_t * g, void *obj)
 {
-    Agraph_t *h;
-
-    h = agraphof(obj);
-    if ((g != h)
-       && ((AGTYPE((Agobj_t *) obj) != AGRAPH) || (g != agparent(h))))
+    if ((AGTYPE((Agobj_t *) obj) == AGRAPH) && (g != agparent(obj)))
        agerr(AGERR, "agdelete on wrong graph");
 
     switch (AGTYPE((Agobj_t *) obj)) {