mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-30 13:38:30 +00:00
Fix crash on double release
Make sure image is set to nil once it has been released. This ensures that we won't release it more than once.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
}
|
||||
_src = src;
|
||||
CGImageRelease(_image);
|
||||
_image = nil;
|
||||
RCTImageSource *source = [RCTConvert RCTImageSource:src];
|
||||
if (source.size.width != 0 && source.size.height != 0) {
|
||||
_imageSize = source.size;
|
||||
|
||||
Reference in New Issue
Block a user