aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-25 11:27:41 -0500
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-25 11:27:41 -0500
commit58d80ab53ea7c71b6e7dd0e56bee1335514a59f6 (patch)
tree1171590fc435cfb55f26f0d66ca713cd0f0eaa14
parent093f3afc35d19608539dafdf0955a6a02fae4297 (diff)
Work around a bug in Chromium
-rw-r--r--src/library_gl.js4
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) {