Skip to content

Commit

Permalink
ext/pyrender/viewer: resolve macOS crashes when initialising Tk()
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAsakura committed Dec 19, 2024
1 parent db7230c commit d8f6bed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions genesis/ext/pyrender/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

from tkinter import Tk
from tkinter import filedialog
root = Tk()
root.withdraw()

import pyglet
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter
Expand Down Expand Up @@ -961,7 +963,6 @@ def _get_save_filename(self, file_exts):
}
filetypes = [file_types[x] for x in file_exts]
try:
root = Tk()
save_dir = self.viewer_flags["save_directory"]
if save_dir is None:
save_dir = os.getcwd()
Expand All @@ -971,7 +972,6 @@ def _get_save_filename(self, file_exts):
except Exception:
return None

root.destroy()
if filename == ():
return None
return filename
Expand Down

0 comments on commit d8f6bed

Please sign in to comment.