From 8c507dc3333d6bdca2aed9ff972652aa65f42214 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sat, 11 Sep 2010 15:42:32 +0200 Subject: [PATCH] Moved cursor object freeing to better place. --- src/x11/x11_init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/x11/x11_init.c b/src/x11/x11_init.c index 6c9793f8..a9260a16 100644 --- a/src/x11/x11_init.c +++ b/src/x11/x11_init.c @@ -175,12 +175,6 @@ static Cursor createNULLCursor(void) static void terminateDisplay(void) { - if (_glfwLibrary.X11.cursor) - { - XFreeCursor(_glfwLibrary.X11.display, _glfwLibrary.X11.cursor); - _glfwLibrary.X11.cursor = (Cursor) 0; - } - if (_glfwLibrary.X11.display) { XCloseDisplay(_glfwLibrary.X11.display); @@ -229,6 +223,12 @@ int _glfwPlatformTerminate(void) while (_glfwLibrary.windowListHead) glfwCloseWindow(_glfwLibrary.windowListHead); + if (_glfwLibrary.X11.cursor) + { + XFreeCursor(_glfwLibrary.X11.display, _glfwLibrary.X11.cursor); + _glfwLibrary.X11.cursor = (Cursor) 0; + } + // Terminate display terminateDisplay();