diff options
Diffstat (limited to 'libs/hwui/Program.cpp')
-rw-r--r-- | libs/hwui/Program.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index 6528d9150110..2e1b9a073e3d 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -46,10 +46,9 @@ Program::Program(const char* vertex, const char* fragment) { GLint infoLen = 0; glGetProgramiv(id, GL_INFO_LOG_LENGTH, &infoLen); if (infoLen > 1) { - char* log = (char*) malloc(sizeof(char) * infoLen); - glGetProgramInfoLog(id, infoLen, 0, log); + GLchar log[infoLen]; + glGetProgramInfoLog(id, infoLen, 0, &log[0]); LOGE("Error while linking shaders: %s", log); - delete log; } glDeleteShader(vertexShader); glDeleteShader(fragmentShader); |