mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
Silly, silly me.
This commit is contained in:
+7
-4
@@ -47,6 +47,12 @@ static int _glfwError = GLFW_NO_ERROR;
|
|||||||
|
|
||||||
void _glfwSetError(int error, const char* description)
|
void _glfwSetError(int error, const char* description)
|
||||||
{
|
{
|
||||||
|
if (!_glfwInitialized)
|
||||||
|
{
|
||||||
|
_glfwError = error;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfwLibrary.errorCallback)
|
if (_glfwLibrary.errorCallback)
|
||||||
{
|
{
|
||||||
if (!description)
|
if (!description)
|
||||||
@@ -117,10 +123,7 @@ GLFWAPI void glfwSetErrorCallback(GLFWerrorfun cbfun)
|
|||||||
{
|
{
|
||||||
if (!_glfwInitialized)
|
if (!_glfwInitialized)
|
||||||
{
|
{
|
||||||
// We can't call _glfwSetError here as _glfwLibrary is uninitialized
|
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||||
// This should be the only place outside of _glfwSetError where we set
|
|
||||||
// the global error status directly
|
|
||||||
_glfwError = GLFW_NOT_INITIALIZED;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user