3D viewer: set right OpenGL context before freeing memory.

This commit is contained in:
Maciej Suminski 2016-05-09 17:59:59 +02:00
parent d9f4877c94
commit d8ca03b362
1 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,13 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( EDA_3D_FRAME* parent, int* attribList ) :
EDA_3D_CANVAS::~EDA_3D_CANVAS()
{
#ifdef __LINUX__
if( IsShownOnScreen() )
SetCurrent( *m_glRC );
#else
SetCurrent( *m_glRC );
#endif
ClearLists();
m_init = false;
delete m_glRC;