Authored by Justin R. Miller

crash safety when closing shape path

@@ -366,7 +366,8 @@ @@ -366,7 +366,8 @@
366 366
367 - (void)closePath 367 - (void)closePath
368 { 368 {
369 - [self addLineToCoordinate:((CLLocation *)[points objectAtIndex:0]).coordinate]; 369 + if ([points count])
  370 + [self addLineToCoordinate:((CLLocation *)[points objectAtIndex:0]).coordinate];
370 } 371 }
371 372
372 - (float)lineWidth 373 - (float)lineWidth