Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
segecey authored May 30, 2021
1 parent 08d7535 commit c3562de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/library/WhirlyGlobeLib/src/VectorData.mm
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,9 @@ bool VectorParseCoords(VectorRing &coords,NSArray *coordArray)
if (![coordArray isKindOfClass:[NSArray class]])
return false;

if([coordArray count] == 0)
return false;

// Look at the type of the first object. If it's not an array, we've got a coord.
NSObject *firstObj = [coordArray objectAtIndex:0];
if (![firstObj isKindOfClass:[NSArray class]])
Expand Down

0 comments on commit c3562de

Please sign in to comment.