]> granicus.if.org Git - graphviz/commitdiff
anticipate failure from decide_point
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 03:06:51 +0000 (20:06 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 May 2021 00:03:36 +0000 (17:03 -0700)
Related to #1801.

lib/ortho/ortho.c

index 81d1e61d18a4f5b4bea1f4004514bbb3f1992624..becbf37a08d247fea3aa89eab41014253bede436 100644 (file)
@@ -1028,10 +1028,14 @@ addPEdges (channel* cp, maze* mp)
                            dir = 1;
                    }
 
-                   decide_point(&p, segs[i], segs[j], 0, dir);
+                   if (decide_point(&p, segs[i], segs[j], 0, dir) != 0) {
+                       return -1;
+                   }
                    hops.a = p.a;
                    prec1 = p.b;
-                   decide_point(&p, segs[i], segs[j], 1, 1-dir);
+                   if (decide_point(&p, segs[i], segs[j], 1, 1-dir) != 0) {
+                       return -1;
+                   }
                    hops.b = p.a;
                    prec2 = p.b;