From: Matthew Fernandez Date: Sat, 24 Apr 2021 02:56:31 +0000 (-0700) Subject: anticipate failure from add_np_edges X-Git-Tag: 2.47.2~13^2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b18905f8e2630fff5de459b7f2d842621bcdfd02;p=graphviz anticipate failure from add_np_edges Related to #1801. --- diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 7e00216ca..ffb43e45a 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -1082,8 +1082,12 @@ assignTracks (maze* mp) create_graphs(mp->vchans); /* add edges between non-parallel segments */ - add_np_edges(mp->hchans); - add_np_edges(mp->vchans); + if (add_np_edges(mp->hchans) != 0) { + return -1; + } + if (add_np_edges(mp->vchans) != 0) { + return -1; + } /* add edges between parallel segments + remove appropriate edges */ add_p_edges(mp->hchans, mp);