From 2807d1d166a7088d1e678a9c813eccbd0f2bd30e Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 13 Feb 2019 15:42:20 +0100 Subject: [PATCH] samples: fix read from negative GeomVertexData row in fractal-plants --- samples/fractal-plants/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/fractal-plants/main.py b/samples/fractal-plants/main.py index fb16a5b1bc..7c0492af85 100755 --- a/samples/fractal-plants/main.py +++ b/samples/fractal-plants/main.py @@ -141,11 +141,14 @@ def drawBody(nodePath, vdata, pos, vecList, radius=1, keepDrawing=True, numVerti drawReWriter.addData1f(keepDrawing) currAngle += angleSlice + if startRow == 0: + return + drawReader = GeomVertexReader(vdata, "drawFlag") drawReader.setRow(startRow - numVertices) # we cant draw quads directly so we use Tristrips - if (startRow != 0) & (drawReader.getData1f() != False): + if drawReader.getData1i() != 0: lines = GeomTristrips(Geom.UHStatic) half = int(numVertices * 0.5) for i in range(numVertices):