diff --git a/iphone/CoreApi/CoreApi/Storage/MWMStorage.mm b/iphone/CoreApi/CoreApi/Storage/MWMStorage.mm index 12c58c8400..b5f70bbbf1 100644 --- a/iphone/CoreApi/CoreApi/Storage/MWMStorage.mm +++ b/iphone/CoreApi/CoreApi/Storage/MWMStorage.mm @@ -40,7 +40,10 @@ using namespace storage; GetFramework().GetStorage().Subscribe( [observers](CountryId const & countryId) { - for (id observer in observers) { + // A copy is created, because MWMMapDownloadDialog is unsubscribed inside this notification with + // NSGenericException', reason: '*** Collection was mutated while being enumerated.' + NSHashTable *observersCopy = [observers copy]; + for (id observer in observersCopy) { [observer processCountryEvent:@(countryId.c_str())]; } },