1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-27 04:28:52 -05:00

Added error check.

This commit is contained in:
Camilla Berglund 2011-05-08 16:29:33 +02:00
parent 8aa8b7c2e4
commit 44035f5ef1

View File

@ -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);
} }