Fix the error when calling getProgramInfoLog on a deleted program (#20561)

This commit is contained in:
Anthony Ramine 2018-09-19 12:32:11 +02:00
parent 943f95fe47
commit a3d8b5d2d3

View file

@ -414,7 +414,7 @@ impl WebGLProgram {
/// glGetProgramInfoLog
pub fn get_info_log(&self) -> WebGLResult<String> {
if self.is_deleted() {
return Err(WebGLError::InvalidOperation);
return Err(WebGLError::InvalidValue);
}
if self.link_called.get() {
let shaders_compiled = match (self.fragment_shader.get(), self.vertex_shader.get()) {