mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
Destroy contexts properly
This commit is contained in:
parent
02c79d9714
commit
1652965ac2
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue