Index: gpu/config/gpu_info_collector_android.cc |
diff --git a/gpu/config/gpu_info_collector_android.cc b/gpu/config/gpu_info_collector_android.cc |
index c6d9b19456a6176714fded5252f1405cb6697e1d..e8f7a470cb8547a632936f5ecac04bd38dd859ed 100644 |
--- a/gpu/config/gpu_info_collector_android.cc |
+++ b/gpu/config/gpu_info_collector_android.cc |
@@ -216,8 +216,10 @@ gpu::CollectInfoResult CollectDriverInfo(gpu::GPUInfo* gpu_info) { |
reinterpret_cast<GLint*>(&gpu_info->gl_reset_notification_strategy)); |
} |
- std::string glsl_version_string = |
- reinterpret_cast<const char*>(glGetStringFn(GL_SHADING_LANGUAGE_VERSION)); |
+ std::string glsl_version_string; |
+ if (const char* glsl_version_cstring = reinterpret_cast<const char*>( |
+ glGetStringFn(GL_SHADING_LANGUAGE_VERSION))) |
+ glsl_version_string = glsl_version_cstring; |
std::string glsl_version = GetVersionFromString(glsl_version_string).first; |
gpu_info->pixel_shader_version = glsl_version; |