Fix crash in OpenGL pyramid example if context creation fails

Initialize context pointers to null so that we don't delete uninitialized junk
later.

See #16910.

Closes https://github.com/wxWidgets/wxWidgets/pull/233
This commit is contained in:
Maarten Bent
2016-02-26 12:35:50 +01:00
committed by Vadim Zeitlin
parent 5ab459e4c7
commit e2fb055329
3 changed files with 7 additions and 1 deletions

View File

@@ -359,6 +359,7 @@ wxGLAttributes& wxGLAttributes::Defaults()
wxGLContext::wxGLContext(wxGLCanvas *win,
const wxGLContext *other,
const wxGLContextAttrs *ctxAttrs)
: m_glContext(NULL)
{
const int* contextAttribs = NULL;
int ctxSize = 0;