Fix crash if glTexParameter was called when no texture bound
This commit is contained in:
parent
c363a37e30
commit
a08ce4a06c
|
@ -572,6 +572,10 @@ void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) {
|
||||||
|
|
||||||
TextureObject* active = getBoundTexture();
|
TextureObject* active = getBoundTexture();
|
||||||
|
|
||||||
|
if(!active) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(target == GL_TEXTURE_2D) {
|
if(target == GL_TEXTURE_2D) {
|
||||||
switch(pname) {
|
switch(pname) {
|
||||||
case GL_TEXTURE_MAG_FILTER:
|
case GL_TEXTURE_MAG_FILTER:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user