diff --git a/src/win32_monitor.c b/src/win32_monitor.c index fe2ae7a1..527e4e6f 100644 --- a/src/win32_monitor.c +++ b/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,