Set OpenGL context before freeing video resources.

This commit is contained in:
Maciej Suminski 2016-05-02 16:12:18 +02:00
parent 59fe8df269
commit c506d2b16c
1 changed files with 1 additions and 0 deletions

View File

@ -127,6 +127,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
OPENGL_GAL::~OPENGL_GAL() OPENGL_GAL::~OPENGL_GAL()
{ {
SetCurrent( *OPENGL_GAL::glContext );
glFlush(); glFlush();
if( --instanceCounter == 0 ) if( --instanceCounter == 0 )