mirror of
https://github.com/glfw/glfw.git
synced 2024-12-03 15:27:11 +00:00
Added error check.
This commit is contained in:
parent
8aa8b7c2e4
commit
44035f5ef1
@ -606,6 +606,12 @@ GLFWAPI void glfwCopyGLState(GLFWwindow hsrc, GLFWwindow hdst, unsigned long mas
|
|||||||
src = (_GLFWwindow*) hsrc;
|
src = (_GLFWwindow*) hsrc;
|
||||||
dst = (_GLFWwindow*) hdst;
|
dst = (_GLFWwindow*) hdst;
|
||||||
|
|
||||||
|
if (_glfwLibrary.currentWindow == dst)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_INVALID_VALUE, "Cannot copy OpenGL state to a current context");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_glfwPlatformCopyGLState(src, dst, mask);
|
_glfwPlatformCopyGLState(src, dst, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user