summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-10-16 16:44:27 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-19 22:22:58 +0200
commit5def168f1435ccbb3b983e3d9280b6ec81b083d3 (patch)
tree7986835ebf4af30250551bf453c634b55305167c /Userland/Libraries/LibGL
parent2d59c9b6b627d041598f6363c3bcff03c1ba65c6 (diff)
downloadserenity-5def168f1435ccbb3b983e3d9280b6ec81b083d3.zip
LibGL: Implement missing `glDeleteLists` error conditions
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r--Userland/Libraries/LibGL/List.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/List.cpp b/Userland/Libraries/LibGL/List.cpp
index c8d9dcb2bc..fda2379120 100644
--- a/Userland/Libraries/LibGL/List.cpp
+++ b/Userland/Libraries/LibGL/List.cpp
@@ -89,6 +89,9 @@ void GLContext::gl_call_lists(GLsizei n, GLenum type, void const* lists)
void GLContext::gl_delete_lists(GLuint list, GLsizei range)
{
+ RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
+ RETURN_WITH_ERROR_IF(range < 0, GL_INVALID_VALUE);
+
if (m_listings.size() < list || m_listings.size() <= list + range)
return;