1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

Fix icon test destroying window from callback

This commit is contained in:
Camilla Berglund 2016-03-18 11:00:28 +01:00
parent e37dbd8b8d
commit fb8a31ba3f

View File

@ -97,7 +97,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
switch (key)
{
case GLFW_KEY_ESCAPE:
glfwDestroyWindow(window);
glfwSetWindowShouldClose(window, GLFW_TRUE);
break;
case GLFW_KEY_SPACE:
cur_icon_color = (cur_icon_color + 1) % 5;