Fix context API checks in native access functions

(cherry picked from commit 727db55c3a)
This commit is contained in:
Ioannis Tsakpinis
2021-10-23 16:17:33 +03:00
committed by Camilla Löwy
parent ca676357c0
commit db85858062
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -674,7 +674,7 @@ GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* handle)
_GLFWwindow* window = (_GLFWwindow*) handle;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (window->context.client != GLFW_NATIVE_CONTEXT_API)
if (window->context.source != GLFW_NATIVE_CONTEXT_API)
{
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
return NULL;
@@ -688,7 +688,7 @@ GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* handle)
_GLFWwindow* window = (_GLFWwindow*) handle;
_GLFW_REQUIRE_INIT_OR_RETURN(None);
if (window->context.client != GLFW_NATIVE_CONTEXT_API)
if (window->context.source != GLFW_NATIVE_CONTEXT_API)
{
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
return None;