X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..92980e9076469956e1e2cb94df97d0f8d873114a:/src/mac/glcanvas.cpp?ds=sidebyside diff --git a/src/mac/glcanvas.cpp b/src/mac/glcanvas.cpp index 62d9c307c4..16e47d4c79 100644 --- a/src/mac/glcanvas.cpp +++ b/src/mac/glcanvas.cpp @@ -141,8 +141,10 @@ wxGLCanvas::wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared, wxWindowID i wxGLCanvas::~wxGLCanvas() { - if (m_glContext) - delete m_glContext; + if (m_glContext != NULL) { + delete m_glContext; + m_glContext = NULL; + } } static AGLPixelFormat ChoosePixelFormat(const int *attribList)