correction for memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
76bfdc7816
commit
bf44306ebc
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user