diff options
Diffstat (limited to 'platform/android/src/map_renderer.cpp')
-rw-r--r-- | platform/android/src/map_renderer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/android/src/map_renderer.cpp b/platform/android/src/map_renderer.cpp index cff021afd2..cd8953e4cf 100644 --- a/platform/android/src/map_renderer.cpp +++ b/platform/android/src/map_renderer.cpp @@ -184,7 +184,12 @@ void MapRenderer::onSurfaceCreated(JNIEnv&) { } } -void MapRenderer::onSurfaceChanged(JNIEnv&, jint width, jint height) { +void MapRenderer::onSurfaceChanged(JNIEnv& env, jint width, jint height) { + if (!renderer) { + // In case the surface has been destroyed (due to app back-grounding) + onSurfaceCreated(env); + } + backend->resizeFramebuffer(width, height); framebufferSizeChanged = true; requestRender(); |