Bug 549747 - Fix a bad null check in WebGLContext::ValidateProgram. r=vlad

This commit is contained in:
Markus Stange 2010-03-08 13:28:19 +01:00
parent 90f17b8799
commit d7e8315247

View File

@ -2160,7 +2160,7 @@ WebGLContext::UseProgram(nsIWebGLProgram *prog)
NS_IMETHODIMP
WebGLContext::ValidateProgram(nsIWebGLProgram *prog)
{
if (!prog && static_cast<WebGLProgram*>(prog)->Deleted())
if (!prog || static_cast<WebGLProgram*>(prog)->Deleted())
return ErrorMessage("glValidateProgram: program is null or has already been deleted!");
GLuint program = static_cast<WebGLProgram*>(prog)->GLName();