Added allocation failure check.

master
Camilla Berglund ago%!(EXTRA string=13 years)
parent ea664c8a39
commit c87829ea61
  1. 5
      src/win32_monitor.c

@ -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…
Cancel
Save