diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-25 11:27:41 -0500 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-01-25 11:27:41 -0500 |
commit | 58d80ab53ea7c71b6e7dd0e56bee1335514a59f6 (patch) | |
tree | 1171590fc435cfb55f26f0d66ca713cd0f0eaa14 | |
parent | 093f3afc35d19608539dafdf0955a6a02fae4297 (diff) |
Work around a bug in Chromium
-rw-r--r-- | src/library_gl.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index fd4d14b2..1c3665cc 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -360,6 +360,10 @@ var LibraryGL = { glGetProgramInfoLog_deps: ['$GL'], glGetProgramInfoLog: function(program, maxLength, length, infoLog) { var log = Module.ctx.getProgramInfoLog(GL.hashtable("program").get(program)); + // Work around a bug in Chromium which causes getProgramInfoLog to return null + if (!log) { + log = ""; + } log = log.substr(0, maxLength - 1); writeStringToMemory(log, infoLog); if (length) { |