[ios] Fix crash when center is nan (empty bounds)

This commit is contained in:
Mikael Sand
2018-12-09 03:03:14 +02:00
parent 8c05da043d
commit fa97bf16b9
+3 -1
View File
@@ -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];