]> granicus.if.org Git - graphviz/commitdiff
anticipate a NULL return from deriveGraph
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Apr 2021 19:33:22 +0000 (12:33 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Apr 2021 01:26:32 +0000 (18:26 -0700)
Related to #1801.

lib/fdpgen/layout.c

index e37a00d30212edb897a0d221e356db80fa48793c..46897b0bd9164504ce96bca5ec9a4867a7f83dfb 100644 (file)
@@ -858,6 +858,9 @@ static int layout(graph_t * g, layout_info * infop)
        DNODE(n) = 0;
 
     dg = deriveGraph(g, infop);
+    if (dg == NULL) {
+       return -1;
+    }
     cc = pg = findCComp(dg, &c_cnt, &pinned);
 
     while ((cg = *pg++)) {