crash safety when closing shape path
Showing
1 changed file
with
2 additions
and
1 deletions
@@ -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 |
-
Please register or login to post a comment