1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Added allocation failure check.

This commit is contained in:
Camilla Berglund 2012-09-12 20:54:45 +02:00
parent ea664c8a39
commit c87829ea61

View File

@ -124,6 +124,11 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
size = 4;
monitors = (_GLFWmonitor**) realloc(monitors, sizeof(_GLFWmonitor*) * size);
if (!monitors)
{
// TODO: wat
return NULL;
}
}
monitors[found] = _glfwCreateMonitor(name,