From 1652965ac2f4a2092bbe20c8b4c25c7f71502bb6 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Fri, 26 Aug 2016 19:07:44 -0700 Subject: [PATCH] Destroy contexts properly --- libraries/gl/src/gl/OffscreenGLCanvas.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/gl/src/gl/OffscreenGLCanvas.cpp b/libraries/gl/src/gl/OffscreenGLCanvas.cpp index e7f821a49f..2f8b29325e 100644 --- a/libraries/gl/src/gl/OffscreenGLCanvas.cpp +++ b/libraries/gl/src/gl/OffscreenGLCanvas.cpp @@ -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;