From 0ba1cf9c591e71d797471f2127abc4c4b3388907 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 13 Sep 2010 22:24:47 +0200 Subject: [PATCH] Removed superfluous nonsense, added platform terminate call on failed platform init. --- src/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/init.c b/src/init.c index a07a2929..97551115 100644 --- a/src/init.c +++ b/src/init.c @@ -50,9 +50,11 @@ GLFWAPI int glfwInit(void) memset(&_glfwLibrary, 0, sizeof(_glfwLibrary)); if (!_glfwPlatformInit()) + { + _glfwPlatformTerminate(); return GL_FALSE; + } - // From now on, GLFW state is valid _glfwInitialized = GL_TRUE; return GL_TRUE; @@ -71,7 +73,6 @@ GLFWAPI void glfwTerminate(void) if (!_glfwPlatformTerminate()) return; - // GLFW is no longer initialized _glfwInitialized = GL_FALSE; }