diff --git a/platform/android/native_map_view.cpp b/platform/android/native_map_view.cpp index 0a69f2d2d..d0c4cdab0 100644 --- a/platform/android/native_map_view.cpp +++ b/platform/android/native_map_view.cpp @@ -423,6 +423,10 @@ void NativeMapView::createSurface(ANativeWindow *window_) { return reinterpret_cast(eglGetProcAddress(name)); }); + if (oldDisplay == EGL_NO_DISPLAY) { + oldDisplay = display; + } + if (!eglMakeCurrent(oldDisplay, oldDrawSurface, oldReadSurface, oldContext)) { mbgl::Log::Error(mbgl::Event::OpenGL, "eglMakeCurrent(EGL_NO_CONTEXT) returned error %d", eglGetError());