project_files/HedgewarsMobile/Classes/UIImageExtra.m
changeset 3778 2e61bb50cc57
parent 3697 d5b30d6373fc
child 3829 81db3c85784b
--- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Thu Aug 26 22:58:38 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m	Sat Aug 28 00:30:29 2010 +0200
@@ -36,6 +36,11 @@
 }
 
 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
+    if (secondImage == nil) {
+        DLog(@"Warning, secondImage == nil");
+        return self;
+    }
+    
     // Create a bitmap graphics context; this will also set it as the current context
     UIGraphicsBeginImageContext(resultingSize);