Fix current content in the destroy of the Scene

Fix the error:
> QOpenGLVertexArrayObject::destroy() failed to restore current context
This commit is contained in:
Laurent Rineau 2023-01-31 17:35:21 +01:00
parent 48b07bef84
commit 61f5354246
1 changed files with 1 additions and 0 deletions

View File

@ -1928,6 +1928,7 @@ void Scene::removeViewer(Viewer_interface *viewer)
if(viewer->property("is_destroyed").toBool())
return;
viewer->makeCurrent();
vaos[viewer]->destroy();
vaos[viewer]->deleteLater();
vaos.remove(viewer);