Commit ec1d0794 authored by Doug Binks's avatar Doug Binks Committed by Degrande Samuel

Added _GLFW_REQUIRE* to user context functions.

parent c8ef1223
......@@ -763,6 +763,8 @@ GLFWAPI GLFWusercontext* glfwCreateUserContext(GLFWwindow* handle)
_GLFWusercontext* context;
_GLFWwindow* window = (_GLFWwindow*)handle;
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
context = _glfwPlatformCreateUserContext(window);
return (GLFWusercontext*)context;
......@@ -771,6 +773,9 @@ GLFWAPI GLFWusercontext* glfwCreateUserContext(GLFWwindow* handle)
GLFWAPI void glfwDestroyUserContext(GLFWusercontext* handle)
{
_GLFWusercontext* context = (_GLFWusercontext*)handle;
_GLFW_REQUIRE_INIT();
if (context)
context->destroy(context);
}
......@@ -779,6 +784,8 @@ GLFWAPI void glfwMakeUserContextCurrent(GLFWusercontext* handle)
{
_GLFWusercontext* context = (_GLFWusercontext*)handle;
_GLFW_REQUIRE_INIT();
glfwMakeContextCurrent(NULL);
if (context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment