]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/glcanvas.cpp
we no longer need wxFrameNative
[wxWidgets.git] / src / mac / carbon / glcanvas.cpp
index 6c1459db388ffb2940d0ab77187f83390d879bd7..0b86e94269243b0e5e550d8cf2846b763bd8eee9 100644 (file)
@@ -301,7 +301,11 @@ IMPLEMENT_CLASS(wxGLApp, wxApp)
 bool wxGLApp::InitGLVisual(int *attribList)
 {
     AGLPixelFormat fmt = ChoosePixelFormat(attribList);
-    return (fmt != NULL);
+    if (fmt != NULL) {
+        aglDestroyPixelFormat(fmt);
+        return true;
+    } else
+        return false;
 }
 
 wxGLApp::~wxGLApp(void)