]> granicus.if.org Git - graphviz/commitdiff
misplaced assert fixed
authorarif <devnull@localhost>
Sun, 1 Mar 2009 16:55:49 +0000 (16:55 +0000)
committerarif <devnull@localhost>
Sun, 1 Mar 2009 16:55:49 +0000 (16:55 +0000)
plugin/core/gvrender_core_fig.c

index 890ec06a5ea1557355a9b16f15ae68075fa3d4af..d9938bb119a808234890040c88c4c14700ac49ea 100644 (file)
@@ -345,7 +345,6 @@ static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start,
     int npoints = n;
     int i;
 
-    assert (n >= 4);
 
     pointf pf, V[4];
     point p;
@@ -355,7 +354,9 @@ static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start,
 
     char *buffer;
     char *buf;
-    buffer =
+    assert (n >= 4);
+
+       buffer =
         malloc((npoints + 1) * (BEZIERSUBDIVISION +
                                 1) * 20 * sizeof(char));
     buf = buffer;