From 72031f5d168253ca9f64ff7fc8678ede8a079bdd Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Mon, 19 Mar 2018 17:51:26 +0300 Subject: [PATCH] [ios] Log empty country id --- iphone/Maps/Classes/MapViewController.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index bf019c4e96..024a7a9a9e 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -23,6 +23,8 @@ #include "drape_frontend/user_event_stream.hpp" +#import + // If you have a "missing header error" here, then please run configure.sh script in the root repo // folder. #import "../../../private.h" @@ -445,6 +447,16 @@ BOOL gIsFirstMyPositionMode = YES; - (void)processCountryEvent:(TCountryId const &)countryId { + if (countryId.empty()) + { +#ifdef OMIM_PRODUCTION + auto err = [[NSError alloc] initWithDomain:kMapsmeErrorDomain code:1 + userInfo:@{@"Description" : @"attempt to get info from empty countryId"}]; + [[Crashlytics sharedInstance] recordError:err]; +#endif + return; + } + NodeStatuses nodeStatuses{}; GetFramework().GetStorage().GetNodeStatuses(countryId, nodeStatuses); if (nodeStatuses.m_status != NodeStatus::Error)