]> granicus.if.org Git - graphviz/commitdiff
Fix bug when maxiter=0 is used.
authorerg <devnull@localhost>
Wed, 6 Feb 2008 19:22:02 +0000 (19:22 +0000)
committererg <devnull@localhost>
Wed, 6 Feb 2008 19:22:02 +0000 (19:22 +0000)
lib/neatogen/neatoinit.c

index 3ddf55c0df309c73fca73b30cac485e58104e3c9..dd49d6dba2cd0c1fea3cda48b658688d4e2c462b 100644 (file)
@@ -1307,7 +1307,7 @@ void neatoLayout(Agraph_t * mg, Agraph_t * g, int layoutMode, int layoutModel)
        MaxIter = 100 * agnnodes(g);
 
     nG = scan_graph_mode(g, layoutMode);
-    if (nG < 2)
+    if ((nG < 2) || (MaxIter <=0))
        return;
     if (layoutMode)
        majorization(mg, g, nG, layoutMode, layoutModel, Ndim, MaxIter);