Browse Source

Merge pull request #185 from SmilyOrg/patch-2

Added check in addPoint to avoid duplicated moveTos breaking
shared-context
Mikko Mononen 10 years ago
parent
commit
1a0550ebc7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/nanovg.c

+ 1
- 1
src/nanovg.c View File

@@ -1060,7 +1060,7 @@ static void nvg__addPoint(NVGcontext* ctx, float x, float y, int flags)
NVGpoint* pt;
if (path == NULL) return;

if (ctx->cache->npoints > 0) {
if (path->count > 0 && ctx->cache->npoints > 0) {
pt = nvg__lastPoint(ctx);
if (nvg__ptEquals(pt->x,pt->y, x,y, ctx->distTol)) {
pt->flags |= flags;


Loading…
Cancel
Save