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:
parent
ea664c8a39
commit
c87829ea61
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user