project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m
changeset 6115 485cfecadc9a
parent 6109 f6726ec81e64
child 6219 c193881389c1
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Sun Oct 09 20:03:04 2011 -0400
+++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Mon Oct 10 02:50:01 2011 +0200
@@ -223,15 +223,19 @@
 #pragma mark -
 #pragma mark delegate
 -(void) turnOnWidgets {
-    [self.delegate turnOnWidgets];
+    if ([self.delegate respondsToSelector:@selector(turnOnWidgets)])
+        [self.delegate turnOnWidgets];
 }
 
 -(void) setLabelText:(NSString *)string {
-    [self.delegate setLabelText:string];
+    if ([self.delegate respondsToSelector:@selector(setMaxLabelText:)])
+        [self.delegate setMaxLabelText:string];
 }
 
 -(NSDictionary *)getDataForEngine {
-    return [self.delegate getDataForEngine];
+    if ([self.delegate respondsToSelector:@selector(getDataForEngine)])
+        return [self.delegate getDataForEngine];
+    return nil;
 }
 
 @end