mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Fixed unguarded calls to monitor callback.
This commit is contained in:
parent
3498163da1
commit
f9d1a37621
|
@ -461,6 +461,7 @@ skills.
|
||||||
* Matt Arsenault
|
* Matt Arsenault
|
||||||
* Keith Bauer
|
* Keith Bauer
|
||||||
* John Bartholomew
|
* John Bartholomew
|
||||||
|
* Niklas Bergström
|
||||||
* blanco
|
* blanco
|
||||||
* Lambert Clara
|
* Lambert Clara
|
||||||
* Noel Cower
|
* Noel Cower
|
||||||
|
|
|
@ -140,7 +140,8 @@ void _glfwInputMonitorChange(void)
|
||||||
window->monitor = NULL;
|
window->monitor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfw.monitorCallback((GLFWmonitor*) monitors[i], GLFW_DISCONNECTED);
|
if (_glfw.monitorCallback)
|
||||||
|
_glfw.monitorCallback((GLFWmonitor*) monitors[i], GLFW_DISCONNECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find and report newly connected monitors (not in the old list)
|
// Find and report newly connected monitors (not in the old list)
|
||||||
|
@ -161,7 +162,8 @@ void _glfwInputMonitorChange(void)
|
||||||
if (j < monitorCount)
|
if (j < monitorCount)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_glfw.monitorCallback((GLFWmonitor*) _glfw.monitors[i], GLFW_CONNECTED);
|
if (_glfw.monitorCallback)
|
||||||
|
_glfw.monitorCallback((GLFWmonitor*) _glfw.monitors[i], GLFW_CONNECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfwDestroyMonitors(monitors, monitorCount);
|
_glfwDestroyMonitors(monitors, monitorCount);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user