diff options
author | Jesse Buhagiar <jooster669@gmail.com> | 2021-08-19 21:16:17 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-19 17:08:04 +0200 |
commit | 68d895eb7c1bfefe35859bd1ba564e6708c19510 (patch) | |
tree | 73b7465f034ed36d74b83cee5041ea834e7cb52c /Userland/Libraries/LibGL | |
parent | ca9619c75043a300c1388e2c6712532ce18ad173 (diff) | |
download | serenity-68d895eb7c1bfefe35859bd1ba564e6708c19510.zip |
LibGL: Don't crash on invalid pname value in glGetFloatv
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.
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r-- | Userland/Libraries/LibGL/SoftwareGLContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 45511b382a..2045e4845d 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -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); } } |