From 6f2468167c80dc81661c3e54b3909507a7938a49 Mon Sep 17 00:00:00 2001 From: leego Date: Thu, 25 May 2023 15:16:36 +0800 Subject: [PATCH] Fix crash when exporting videos using OSMesa --- animated_drawings/view/mesa_view.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/animated_drawings/view/mesa_view.py b/animated_drawings/view/mesa_view.py index 4677ebb1..ff679937 100644 --- a/animated_drawings/view/mesa_view.py +++ b/animated_drawings/view/mesa_view.py @@ -140,4 +140,5 @@ def clear_window(self) -> None: GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT) # type: ignore def cleanup(self) -> None: - """ No need to destroy a window, as none was created. """ + """ Destroy the context when it is finished. """ + osmesa.OSMesaDestroyContext(self.ctx)