fix crashing on shutdown. Qt not garanted that OpenGL context will be binded on current thread, on other method than painGL, resizeGl and other virtual methods of QGLWidget

This commit is contained in:
ExMix 2013-04-17 17:58:22 +03:00 committed by Alex Zolotarev
parent fded56bd18
commit 6aae44fff1

View file

@ -88,6 +88,8 @@ namespace qt
void DrawWidget::PrepareShutdown()
{
KillPressTask();
ASSERT(isValid(), ());
makeCurrent();
m_framework->PrepareToShutdown();
m_videoTimer.reset();
}