forked from Mirrors/openclonk
gl: Don't call glDeleteObjectARB on null objects
glDeleteObjectARB will flag GL_INVALID_PARAMETER when it's called with a null parameter. Avoid this so the error list doesn't get tainted.issue1247
parent
cac94659d0
commit
50a81a8dc7
|
@ -121,7 +121,9 @@ void C4LandscapeRenderGL::Clear()
|
|||
}
|
||||
for (i = 0; i < C4LR_MipMapCount; i++)
|
||||
{
|
||||
glDeleteObjectARB(hMaterialTexture[i]);
|
||||
// Unlike delete, glDeleteObject doesn't like a 0 parameter
|
||||
if (hMaterialTexture[i] != 0)
|
||||
glDeleteObjectARB(hMaterialTexture[i]);
|
||||
hMaterialTexture[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue