X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..bd996abe63a8ed6aa07b26856a0d7935002e3e81:/src/mac/glcanvas.cpp 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)