Mac用艦これ専用ブラウザ おまけ機能付き
修訂 | 57f656742a017a851367961c576205d3ecd9397c (tree) |
---|---|
時間 | 2014-06-04 22:25:08 |
作者 | masakih <masakih@user...> |
Commiter | masakih |
完全勝利の時エラーログが出力される問題を解消
@@ -135,8 +135,10 @@ | ||
135 | 135 | } while(NO); |
136 | 136 | |
137 | 137 | // hougeki1 |
138 | - { | |
138 | + do { | |
139 | 139 | id targetShips = [self.json valueForKeyPath:@"api_data.api_hougeki1.api_df_list"]; |
140 | + if(!targetShips || [targetShips isKindOfClass:[NSNull class]]) break; | |
141 | + | |
140 | 142 | id hougeki1Damages = [self.json valueForKeyPath:@"api_data.api_hougeki1.api_damage"]; |
141 | 143 | NSInteger i = 0; |
142 | 144 | for(NSArray *array in targetShips) { |
@@ -162,7 +164,7 @@ | ||
162 | 164 | } |
163 | 165 | i++; |
164 | 166 | } |
165 | - } | |
167 | + } while(NO); | |
166 | 168 | |
167 | 169 | // hougeki2 |
168 | 170 | do { |
@@ -218,8 +220,10 @@ | ||
218 | 220 | NSArray *damages = [self damages]; |
219 | 221 | |
220 | 222 | // hougeki |
221 | - { | |
223 | + do { | |
222 | 224 | id targetShips = [self.json valueForKeyPath:@"api_data.api_hougeki.api_df_list"]; |
225 | + if(!targetShips || [targetShips isKindOfClass:[NSNull class]]) break; | |
226 | + | |
223 | 227 | id hougeki1Damages = [self.json valueForKeyPath:@"api_data.api_hougeki.api_damage"]; |
224 | 228 | NSInteger i = 0; |
225 | 229 | for(NSArray *array in targetShips) { |
@@ -245,7 +249,7 @@ | ||
245 | 249 | } |
246 | 250 | i++; |
247 | 251 | } |
248 | - } | |
252 | + } while(NO); | |
249 | 253 | |
250 | 254 | [self.store saveAction:nil]; |
251 | 255 | } |