Fixed potential segfault on init.

This commit is contained in:
Camilla Berglund 2013-08-21 10:14:16 +02:00
parent 71c07feffd
commit 83f57ff0ce
2 changed files with 3 additions and 1 deletions

View File

@ -208,6 +208,8 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
- Allowed character callback to be triggered regardless of modifier keys
- Bugfix: The `-Wall` flag was not used with Clang and other GCC compatibles
- Bugfix: The default for `GLFW_ALPHA_BITS` was set to zero
- Bugfix: `glfwInit` would segfault if monitor enumeration failed and no error
callback was set
- [Win32] Added `_GLFW_USE_DWM_SWAP_INTERVAL` for forcing the swap interval
to be set even when DWM compositing is enabled
- [Win32] Added support for forcing the use of the high-performance GPU

View File

@ -130,7 +130,7 @@ GLFWAPI int glfwInit(void)
_glfw.monitors = _glfwPlatformGetMonitors(&_glfw.monitorCount);
if (_glfw.monitors == NULL)
{
_glfwErrorCallback(GLFW_PLATFORM_ERROR, "No monitors found");
_glfwInputError(GLFW_PLATFORM_ERROR, "No monitors found");
_glfwPlatformTerminate();
return GL_FALSE;
}