Improve cleanup_preview_threads function

This commit is contained in:
Deniz Şafak
2025-11-24 00:46:13 +03:00
parent ed418ac11d
commit 290c265d5e
+4 -3
View File
@@ -1,5 +1,6 @@
import os
import time
import sys
import tempfile
import platform
import base64
@@ -2847,10 +2848,10 @@ class abogen(QWidget):
# Cleanup pygame mixer if initialized
try:
import pygame
if pygame.mixer.get_init():
pygame = sys.modules.get('pygame')
if pygame and pygame.mixer.get_init():
pygame.mixer.quit()
except ImportError:
except Exception:
pass
def closeEvent(self, event):