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

Unified Diff: chrome/gpu/gpu_info_collector_mac.mm

Issue 5305005: Initialize destinations variables before calling GL functions... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « app/gfx/gl/gl_context.cc ('k') | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_info_collector_mac.mm
===================================================================
--- chrome/gpu/gpu_info_collector_mac.mm (revision 67161)
+++ chrome/gpu/gpu_info_collector_mac.mm (working copy)
@@ -81,13 +81,15 @@
int shader_version = 0;
if (gl_major_version == 1) {
- char *gl_extensions_string = (char*)glGetString(GL_EXTENSIONS);
- if (strstr(gl_extensions_string, "GL_ARB_shading_language_100")) {
+ const char *gl_extensions_string = (const char*)glGetString(GL_EXTENSIONS);
+ if (gl_extensions_string &&
+ strstr(gl_extensions_string, "GL_ARB_shading_language_100")) {
gl_hlsl_major = 1;
gl_hlsl_minor = 0;
}
} else if (gl_major_version > 1) {
- char *glsl_version_string = (char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
+ const char *glsl_version_string =
+ (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
if (glsl_version_string)
sscanf(glsl_version_string, "%u.%u", &gl_hlsl_major, &gl_hlsl_minor);
}
« no previous file with comments | « app/gfx/gl/gl_context.cc ('k') | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698