mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +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
@@ -259,9 +259,6 @@ void _glfwSetGammaRampWayland(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
||||
|
||||
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* handle)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||
assert(monitor != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
|
||||
if (_glfw.platform.platformID != GLFW_PLATFORM_WAYLAND)
|
||||
@@ -270,6 +267,9 @@ GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* handle)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||
assert(monitor != NULL);
|
||||
|
||||
return monitor->wl.output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user