From 4a05ed66f88b1116e74e972e964c18a46ea068b7 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 23 Apr 2021 20:01:04 -0700 Subject: [PATCH] anticipate failure from add_p_edges Related to #1801. --- lib/ortho/ortho.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 716b2a724..ff9d89960 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -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); -- 2.50.1