Skip to content

Commit

Permalink
LibGL: Don't crash on invalid pname value in glGetFloatv
Browse files Browse the repository at this point in the history
This brings `glGetFloatv` more inline with the other `glGet`
functions. We should prevent crashing in the driver as much as
possible and instead let the application deal with the generated
GL error.
  • Loading branch information
Quaker762 authored and awesomekling committed Aug 19, 2021
1 parent ca9619c commit 68d895e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibGL/SoftwareGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ void SoftwareGLContext::gl_get_floatv(GLenum pname, GLfloat* params)
default:
// FIXME: Because glQuake only requires GL_MODELVIEW_MATRIX, that is the only parameter
// that we currently support. More parameters should be supported.
TODO();
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
}
}

Expand Down

0 comments on commit 68d895e

Please sign in to comment.