From fb5eae10cc55393509f2d8ed7add5eb9b47c8ef0 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 24 Feb 2016 12:12:30 +0300 Subject: [PATCH] [omim] Fixed crash on migration. --- map/framework.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/map/framework.cpp b/map/framework.cpp index 34b7f7654f..06a0df8d67 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -261,6 +261,11 @@ bool Framework::PreMigrate(ms::LatLon const & position, void Framework::Migrate(bool keepDownloaded) { + // Drape must be suspended while migration is performed since it access different parts of + // framework (i.e. m_infoGetter) which are reinitialized during migration process. + // If we do not suspend drape, it tries to access framework fields (i.e. m_infoGetter) which are null + // while migration is performed. + SetRenderingEnabled(false); m_searchEngine.reset(); m_infoGetter.reset(); TCountriesVec existedCountries; @@ -271,6 +276,7 @@ void Framework::Migrate(bool keepDownloaded) InitCountryInfoGetter(); InitSearchEngine(); RegisterAllMaps(); + SetRenderingEnabled(true); InvalidateRect(MercatorBounds::FullRect()); }