project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 3978 9660600e43cb
parent 3948 24daa33a3114
child 4356 d1d26f8963a3
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Fri Oct 15 01:10:59 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Sat Oct 16 18:35:28 2010 +0200
@@ -138,9 +138,9 @@
     UIImage *newImage = [UIImage imageWithCGImage:imageRef];
 
     // Release colorspace, context and bitmap information
-    CGColorSpaceRelease(colorSpace);
+    CFRelease(imageRef);
     CGContextRelease(context);
-    CFRelease(imageRef);
+    CGColorSpaceRelease(colorSpace);
 
     // Return the new grayscale image
     return newImage;