Fix telemetry-related exit crash from use-after-free (#5617)

* Fix telemetry-related exit crash from use-after-free

* ...clang format
This commit is contained in:
xperia64 2020-11-22 08:45:14 -05:00 committed by GitHub
parent 2d972f91b2
commit 4f058c04e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1210,9 +1210,12 @@ VideoCore::ResultStatus RendererOpenGL::Init() {
LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model);
auto& telemetry_session = Core::System::GetInstance().TelemetrySession(); auto& telemetry_session = Core::System::GetInstance().TelemetrySession();
telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor",
telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); std::string(gpu_vendor));
telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version); telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_Model",
std::string(gpu_model));
telemetry_session.AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version",
std::string(gl_version));
if (!strcmp(gpu_vendor, "GDI Generic")) { if (!strcmp(gpu_vendor, "GDI Generic")) {
return VideoCore::ResultStatus::ErrorGenericDrivers; return VideoCore::ResultStatus::ErrorGenericDrivers;