diff src/video/quartz/SDL_QuartzGL.m @ 1160:72c6c3e5bb85

Closed a memory leak caused when quitting video subsystem on Quartz target.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 13 Oct 2005 09:47:06 +0000
parents c3c8739f7844
children e967ab22e6fd
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzGL.m	Tue Oct 11 23:57:04 2005 +0000
+++ b/src/video/quartz/SDL_QuartzGL.m	Thu Oct 13 09:47:06 2005 +0000
@@ -119,6 +119,8 @@
     gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt
                                                shareContext:nil];
 
+    [ fmt release ];
+
     if (gl_context == nil) {
         SDL_SetError ("Failed creating OpenGL context");
         return 0;
@@ -152,8 +154,6 @@
     /* Convince SDL that the GL "driver" is loaded */
     this->gl_config.driver_loaded = 1;
 
-    [ fmt release ];
-
     return 1;
 }