mirror of
https://github.com/glfw/glfw.git
synced 2026-02-06 10:47:31 +00:00
X11: Place argument assertion after platform check
This lets automated testing check that GLFW_NOT_INITIALIZED is emitted for every public function.
This commit is contained in:
parent
9352d8fe93
commit
96e0f49395
@ -3344,8 +3344,6 @@ GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
|
||||
|
||||
GLFWAPI void glfwSetX11SelectionString(const char* string)
|
||||
{
|
||||
assert(string != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
if (_glfw.platform.platformID != GLFW_PLATFORM_X11)
|
||||
@ -3354,6 +3352,8 @@ GLFWAPI void glfwSetX11SelectionString(const char* string)
|
||||
return;
|
||||
}
|
||||
|
||||
assert(string != NULL);
|
||||
|
||||
_glfw_free(_glfw.x11.primarySelectionString);
|
||||
_glfw.x11.primarySelectionString = _glfw_strdup(string);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user