From d78e90e18906a393eb91163f42be65b12838c91e Mon Sep 17 00:00:00 2001 From: Jakub Grzywacz Date: Mon, 5 Aug 2024 08:30:56 +0200 Subject: [PATCH] fix: apple empty filter results (#2393) # Summary When there is no content of CGImage, ref will return `nil` instead of empty image and crash, we should ignore that results and continue applying filters. ## Example ```tsx ``` --- apple/Filters/RNSVGFilter.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple/Filters/RNSVGFilter.mm b/apple/Filters/RNSVGFilter.mm index 2acccd51..ab1c0dc1 100644 --- a/apple/Filters/RNSVGFilter.mm +++ b/apple/Filters/RNSVGFilter.mm @@ -104,7 +104,7 @@ using namespace facebook::react; fromRect:[result extent]]; result = [CIImage imageWithCGImage:cgResult]; CGImageRelease(cgResult); - if (currentFilter.result) { + if (result != nil && currentFilter.result) { [resultsMap setObject:result forKey:currentFilter.result]; } } else {