mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Place assertions for handles after init check
This lets automated testing check that GLFW_NOT_INITIALIZED is emitted for every public function.
This commit is contained in:
+3
-3
@@ -3302,9 +3302,6 @@ GLFWAPI Display* glfwGetX11Display(void)
|
||||
|
||||
GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
assert(window != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(None);
|
||||
|
||||
if (_glfw.platform.platformID != GLFW_PLATFORM_X11)
|
||||
@@ -3313,6 +3310,9 @@ GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
|
||||
return None;
|
||||
}
|
||||
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
assert(window != NULL);
|
||||
|
||||
return window->x11.handle;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user