Destroy contexts properly

This commit is contained in:
Brad Davis 2016-08-26 19:07:44 -07:00
parent 02c79d9714
commit 1652965ac2

View file

@ -23,7 +23,8 @@ OffscreenGLCanvas::OffscreenGLCanvas() : _context(new QOpenGLContext), _offscree
}
OffscreenGLCanvas::~OffscreenGLCanvas() {
_context->doneCurrent();
// A context with logging enabled needs to be current when it's destroyed
_context->makeCurrent(_offscreenSurface);
delete _context;
_context = nullptr;