GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

GLProgram double free error after link

Open fks opened this issue 14 years ago • 1 comments

After "link" fragment shaders and vertext shaders are deleted. Later in "dealloc" the will get deleted again resulting in strange effects.

IMHO this should fix it:

if (vertShader){
    glDeleteShader(vertShader);
    vertShader = 0;
}
if (fragShader){
    glDeleteShader(fragShader);
    fragShader = 0;
}

fks avatar May 26 '12 09:05 fks

Thanks for pointing this out, it should be fixed in the latest commit. I'll let Jeff know about that.

BradLarson avatar May 27 '12 22:05 BradLarson