From e0f5686d667152582f052021cd62bd2ef8c6b470 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 22 Apr 2022 10:16:43 -0700 Subject: [PATCH] Fix bug with trying to close window during embed --- manimlib/scene/scene.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manimlib/scene/scene.py b/manimlib/scene/scene.py index a540cd09..d3617f5b 100644 --- a/manimlib/scene/scene.py +++ b/manimlib/scene/scene.py @@ -163,7 +163,11 @@ class Scene(object): # Enables gui interactions during the embed def inputhook(context): while not context.input_is_ready(): - self.update_frame() + if self.window.is_closing: + pass + # self.window.destroy() + else: + self.update_frame(dt=0) pt_inputhooks.register("manim", inputhook) shell.enable_gui("manim")