Added missing screen resource cleanup.

This commit is contained in:
Camilla Berglund 2012-10-21 23:55:41 +02:00
parent 8176cae1bc
commit d75c06a994
1 changed files with 2 additions and 0 deletions

View File

@ -446,6 +446,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
monitors = (_GLFWmonitor**) calloc(sr->noutput, sizeof(_GLFWmonitor*)); monitors = (_GLFWmonitor**) calloc(sr->noutput, sizeof(_GLFWmonitor*));
if (!monitors) if (!monitors)
{ {
XRRFreeScreenResources(sr);
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL); _glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
return NULL; return NULL;
} }