mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
485475ab3e
Summary: Changelog: [Internal] `CFRelease` crashes app if `cf` is `NULL`, `CGColorRelease` doesn't. From: https://developer.apple.com/documentation/coregraphics/1586340-cgcolorrelease?language=objc# Even though this hasn't happened yet, we had a similar crash in D21943011. Also `CGColorCreate` returns nullable so it could happen. In order to prevent this in the future, let's switch to `CGColorRelease` which doesn't crash if `cf` is `NULL` and also is semantically correct. Reviewed By: shergin Differential Revision: D21953404 fbshipit-source-id: 8b969ee345c2507fcba2442fa20e3fdaf2235d8c