From fa97bf16b9848369e3f8acdd8512f2eac3ba261f Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Sun, 9 Dec 2018 03:03:14 +0200 Subject: [PATCH] [ios] Fix crash when center is nan (empty bounds) --- ios/Elements/RNSVGGroup.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Elements/RNSVGGroup.m b/ios/Elements/RNSVGGroup.m index e9021051..f4334517 100644 --- a/ios/Elements/RNSVGGroup.m +++ b/ios/Elements/RNSVGGroup.m @@ -79,7 +79,9 @@ CGPoint center = CGPointApplyAffineTransform(mid, matrix); self.bounds = bounds; - self.center = center; + if (!isnan(center.x) && !isnan(center.y)) { + self.center = center; + } self.frame = bounds; [self popGlyphContext];