Skip to content

Commit

Permalink
Merge pull request #4365 from srahim/timob-14155-3_1_X
Browse files Browse the repository at this point in the history
[TIMOB-14155]iOS: MapView crash when setRegion is called with Nan lat & long - 3_1_X
  • Loading branch information
WhichKatieDid committed Jun 9, 2013
2 parents 5f091d7 + d9dc417 commit dc4d8fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iphone/Classes/TiMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ -(void)render
return;
}

if (region.center.latitude!=0 && region.center.longitude!=0)
if (region.center.latitude!=0 && region.center.longitude!=0 && !isnan(region.center.latitude) && !isnan(region.center.longitude))
{
if (regionFits) {
[map setRegion:[map regionThatFits:region] animated:animate];
Expand Down

0 comments on commit dc4d8fc

Please sign in to comment.