diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index cf7b80741..18ab38e68 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -124,8 +124,11 @@ void Context::initializeExtensions(const std::function(MBGL_CHECK_ERROR(glGetString(GL_RENDERER))); - Log::Info(Event::General, "GPU Identifier: %s", renderer.c_str()); + static const std::string renderer = []() { + std::string r = reinterpret_cast(MBGL_CHECK_ERROR(glGetString(GL_RENDERER))); + Log::Info(Event::General, "GPU Identifier: %s", r.c_str()); + return r; + }(); // Block ANGLE on Direct3D since the debugging extension is causing crashes if (!(renderer.find("ANGLE") != std::string::npos