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) switch (key)
{ {
case GLFW_KEY_ESCAPE: case GLFW_KEY_ESCAPE:
glfwDestroyWindow(window); glfwSetWindowShouldClose(window, GLFW_TRUE);
break; break;
case GLFW_KEY_SPACE: case GLFW_KEY_SPACE:
cur_icon_color = (cur_icon_color + 1) % 5; cur_icon_color = (cur_icon_color + 1) % 5;