From bcbb7e6029b672cbbbd772700b62a9e404fee428 Mon Sep 17 00:00:00 2001 From: Slavik Romanuk Date: Fri, 8 Feb 2013 14:03:07 +0200 Subject: [PATCH] Fixing crash if effect's target was nil. --- framework/Source/GPUImageFilter.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/Source/GPUImageFilter.m b/framework/Source/GPUImageFilter.m index 5aca18ccf..5575dc9fb 100755 --- a/framework/Source/GPUImageFilter.m +++ b/framework/Source/GPUImageFilter.m @@ -157,7 +157,10 @@ void dataProviderUnlockCallback (void *info, const void *data, size_t size) GPUImageFilter *filter = (__bridge_transfer GPUImageFilter*)info; CVPixelBufferUnlockBaseAddress([filter renderTarget], 0); - CFRelease([filter renderTarget]); + + if ([filter renderTarget]) { + CFRelease([filter renderTarget]); + } [filter destroyFilterFBO];