Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Fix crash on Marshmallow
Browse files Browse the repository at this point in the history
Fixes #2813
  • Loading branch information
Leith Bade committed Oct 27, 2015
1 parent 32c0fb4 commit 43dde0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/android/native_map_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ void NativeMapView::createSurface(ANativeWindow *window_) {
return reinterpret_cast<mbgl::gl::glProc>(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());
Expand Down

0 comments on commit 43dde0f

Please sign in to comment.