From: Matthew Fernandez Date: Sat, 24 Apr 2021 03:01:04 +0000 (-0700) Subject: anticipate failure from add_p_edges X-Git-Tag: 2.47.2~13^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a05ed66f88b1116e74e972e964c18a46ea068b7;p=graphviz anticipate failure from add_p_edges Related to #1801. --- 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);