mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 00:42:31 +00:00
[ios] Fix crash when center is nan (empty bounds)
This commit is contained in:
@@ -79,7 +79,9 @@
|
|||||||
CGPoint center = CGPointApplyAffineTransform(mid, matrix);
|
CGPoint center = CGPointApplyAffineTransform(mid, matrix);
|
||||||
|
|
||||||
self.bounds = bounds;
|
self.bounds = bounds;
|
||||||
self.center = center;
|
if (!isnan(center.x) && !isnan(center.y)) {
|
||||||
|
self.center = center;
|
||||||
|
}
|
||||||
self.frame = bounds;
|
self.frame = bounds;
|
||||||
|
|
||||||
[self popGlyphContext];
|
[self popGlyphContext];
|
||||||
|
|||||||
Reference in New Issue
Block a user