Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: gpu/config/gpu_info_collector_android.cc

Issue 1358873002: Crash fix for when running under the Android emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698