]> granicus.if.org Git - graphviz/commitdiff
anticipate failure from add_p_edges
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 03:01:04 +0000 (20:01 -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 716b2a72486cc1c4db9d0f6ada89f1468e8d2bc3..ff9d89960a2710c07023c8dada9d1b2fbc003935 100644 (file)
@@ -1096,8 +1096,12 @@ assignTracks (maze* mp)
     }
 
     /* add edges between parallel segments + remove appropriate edges */
-    add_p_edges(mp->hchans, mp);
-    add_p_edges(mp->vchans, mp);
+    if (add_p_edges(mp->hchans, mp) != 0) {
+       return -1;
+    }
+    if (add_p_edges(mp->vchans, mp) != 0) {
+       return -1;
+    }
 
     /* Assign the tracks after a top sort */
     assignTrackNo (mp->hchans);