From c3562de651351c704c82148759526ccbb52af531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sedat=20=C3=A7ift=C3=A7i?= Date: Sun, 30 May 2021 18:25:05 +0300 Subject: [PATCH] fix crash --- ios/library/WhirlyGlobeLib/src/VectorData.mm | 3 +++ 1 file changed, 3 insertions(+) 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]])