X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1650623133123f4f708c61af6446aaaff9ef11e8..2fe212b0336512aac9eace69fab09ce856b0bf4b:/src/mac/glcanvas.cpp diff --git a/src/mac/glcanvas.cpp b/src/mac/glcanvas.cpp index 6c1459db38..0b86e94269 100644 --- a/src/mac/glcanvas.cpp +++ b/src/mac/glcanvas.cpp @@ -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)