From 5def168f1435ccbb3b983e3d9280b6ec81b083d3 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 16 Oct 2022 16:44:27 +0200 Subject: LibGL: Implement missing `glDeleteLists` error conditions --- Userland/Libraries/LibGL/List.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Userland/Libraries/LibGL') 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; -- cgit v1.2.3