From 5b49dcee14401e86110859948fdd45d443038a7f Mon Sep 17 00:00:00 2001 From: Constantin Shalnev Date: Thu, 11 Feb 2016 19:47:42 +0300 Subject: [PATCH] [new-downloader] Fixed getting name for parent --- storage/storage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/storage.cpp b/storage/storage.cpp index 2f58e03651..1c29aaa2a6 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -1154,7 +1154,10 @@ void Storage::GetNodeAttrs(TCountryId const & countryId, NodeAttrs & nodeAttrs) nodeAttrs.m_error = statusAndErr.error; nodeAttrs.m_nodeLocalName = m_countryNameGetter(countryId); nodeAttrs.m_parentCountryId = nodeValue.GetParent(); - nodeAttrs.m_parentLocalName = m_countryNameGetter(nodeAttrs.m_parentCountryId); + if (nodeAttrs.m_parentCountryId.empty()) + nodeAttrs.m_parentLocalName.clear(); + else + nodeAttrs.m_parentLocalName = m_countryNameGetter(nodeAttrs.m_parentCountryId); } void Storage::DoClickOnDownloadMap(TCountryId const & countryId)