diff --git a/ios/library/WhirlyGlobeLib/src/VectorData.mm b/ios/library/WhirlyGlobeLib/src/VectorData.mm index 71263132d5..c93d18b29d 100644 --- a/ios/library/WhirlyGlobeLib/src/VectorData.mm +++ b/ios/library/WhirlyGlobeLib/src/VectorData.mm @@ -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]])