]> granicus.if.org Git - graphviz/commitdiff
Fix bug of nested glBegin()'s
authorerg <devnull@localhost>
Thu, 19 Aug 2010 21:39:07 +0000 (21:39 +0000)
committererg <devnull@localhost>
Thu, 19 Aug 2010 21:39:07 +0000 (21:39 +0000)
cmd/smyrna/topviewfuncs.c

index 03a75c30ca7b014a3097908ce1f0b441fde3466b..d54cc28445be85b4bafdcbb85bd5cc28585b46b3 100644 (file)
@@ -655,13 +655,12 @@ static void renderEdges(Agraph_t * g)
            x=parseXdotwithattrs(e);
            draw_xdot(x,0);
 
-
            if(x)
                freeXDot (x);
        }
     }
 
-    glBegin(GL_LINES);
+    if (drawSegs) glBegin(GL_LINES);
     for (v = agfstnode(g); v; v = agnxtnode(g, v)) 
     {
        for (e = agfstout(g, v); e; e = agnxtout(g, e)) 
@@ -690,7 +689,7 @@ static void renderEdges(Agraph_t * g)
            }
        }
     }
-    glEnd();
+    if (drawSegs) glEnd();
 }
 
 static void renderNodeLabels(Agraph_t * g)