diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index c84fed3148..2717980875 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -131,12 +131,11 @@ bool Framework::CreateDrapeEngine(JNIEnv * env, jobject jSurface, int densityDpi m_work.CreateDrapeEngine(make_ref(m_contextFactory), move(p)); m_work.EnterForeground(); - // Load initial state of the map or execute drape tasks which set up custom state. + // Load initial state of the map and execute drape tasks which set up custom state. + LoadState(); { lock_guard lock(m_drapeQueueMutex); - if (m_drapeTasksQueue.empty()) - LoadState(); - else + if (!m_drapeTasksQueue.empty()) ExecuteDrapeTasks(); }