Fixed crash in rcBuildPolyMesh() when one of the contours had zero vertices.

This commit is contained in:
Mikko Mononen
2009-11-25 15:21:49 +00:00
parent f77a7511ed
commit d142754ad5
2 changed files with 29 additions and 7 deletions

View File

@@ -617,6 +617,8 @@ void rcDebugDrawContours(rcDebugDraw* dd, const rcContourSet& cset, const float
for (int i = 0; i < cset.nconts; ++i)
{
const rcContour& c = cset.conts[i];
if (!c.nverts)
continue;
unsigned int color = intToCol(c.reg, a);
for (int j = 0; j < c.nverts; ++j)