diff --git a/drape_frontend/batchers_pool.hpp b/drape_frontend/batchers_pool.hpp index e1003a8057..654d65b960 100644 --- a/drape_frontend/batchers_pool.hpp +++ b/drape_frontend/batchers_pool.hpp @@ -53,7 +53,7 @@ public: ref_ptr GetBatcher(TKey const & key) { auto it = m_batchers.find(key); - ASSERT(it != m_batchers.end(), ()); + CHECK(it != m_batchers.end(), ()); return make_ref(it->second.first); } diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index 6ebd798261..e3e9434de3 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -328,12 +328,15 @@ void FrontendRenderer::AcceptMessage(ref_ptr message) drape_ptr renderer = std::move(msg->AcceptRenderer()); renderer->Build(make_ref(m_gpuProgramManager)); if (msg->NeedResetOldGui()) - m_guiRenderer.release(); + m_guiRenderer.reset(); if (m_guiRenderer == nullptr) m_guiRenderer = std::move(renderer); else m_guiRenderer->Merge(make_ref(renderer)); + CHECK(m_guiRenderer != nullptr, ()); + m_guiRenderer->SetLayout(m_lastWidgetsLayout); + bool oldMode = m_choosePositionMode; m_choosePositionMode = m_guiRenderer->HasWidget(gui::WIDGET_CHOOSE_POSITION_MARK); if (oldMode != m_choosePositionMode) @@ -351,8 +354,9 @@ void FrontendRenderer::AcceptMessage(ref_ptr message) case Message::GuiLayerLayout: { - ASSERT(m_guiRenderer != nullptr, ()); - m_guiRenderer->SetLayout(ref_ptr(message)->GetLayoutInfo()); + m_lastWidgetsLayout = ref_ptr(message)->GetLayoutInfo(); + if (m_guiRenderer != nullptr) + m_guiRenderer->SetLayout(m_lastWidgetsLayout); break; } diff --git a/drape_frontend/frontend_renderer.hpp b/drape_frontend/frontend_renderer.hpp index 42d1fc42db..20d7f4dfeb 100755 --- a/drape_frontend/frontend_renderer.hpp +++ b/drape_frontend/frontend_renderer.hpp @@ -260,6 +260,7 @@ private: std::array m_layers; drape_ptr m_guiRenderer; + gui::TWidgetsLayoutInfo m_lastWidgetsLayout; drape_ptr m_myPositionController; drape_ptr m_selectionShape; drape_ptr m_routeRenderer;