mirror of
https://github.com/lubosz/overte.git
synced 2025-05-28 03:51:29 +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() {
|
OffscreenGLCanvas::~OffscreenGLCanvas() {
|
||||||
_context->doneCurrent();
|
// A context with logging enabled needs to be current when it's destroyed
|
||||||
|
_context->makeCurrent(_offscreenSurface);
|
||||||
delete _context;
|
delete _context;
|
||||||
_context = nullptr;
|
_context = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue