2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit ccad2c19 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed CampVisApplication deinitialization (possible assertion due to wrong order)

parent 4b54ac8a
......@@ -235,14 +235,8 @@ namespace campvis {
_mainWindow->deinit();
QuadRenderer::deinit();
// deinit OpenGL and cgt
cgt::deinitGL();
}
// MainWindow dtor needs a valid CampVisApplication, so we need to call it here instead of during destruction.
delete _mainWindow;
// now delete everything in the right order:
for (std::vector<PipelineRecord>::iterator it = _pipelines.begin(); it != _pipelines.end(); ++it) {
delete it->_painter;
......@@ -252,6 +246,12 @@ namespace campvis {
delete *it;
}
{
// Deinit everything OpenGL using the local context.
cgt::GLContextScopedLock lock(_localContext);
cgt::deinitGL();
}
GLJobProc.stop();
OpenGLJobProcessor::deinit();
SimpleJobProcessor::deinit();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment