From e2348da8dd6a0d047e1d559d97bd551ac4864542 Mon Sep 17 00:00:00 2001 From: SeanIFitch Date: Tue, 7 May 2024 15:06:53 -0400 Subject: [PATCH] Fix quit on device unconnected --- src/BufferLoader.py | 2 +- src/main.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BufferLoader.py b/src/BufferLoader.py index 3f602b0..0a25f6f 100644 --- a/src/BufferLoader.py +++ b/src/BufferLoader.py @@ -71,6 +71,6 @@ def get_sample_rate(self): def quit(self): self.may_start = False - if hasattr(self, "device") and self.device.acquiring: + if self.device is not None and self.device.acquiring: self.device.stop() self.device.close_device() diff --git a/src/main.py b/src/main.py index 6e738ad..15a3af5 100644 --- a/src/main.py +++ b/src/main.py @@ -13,7 +13,6 @@ def main(): # Use XCB platform for Qt # Wayland does not render drop shadows or toolbar colors and offsets popups os.environ["QT_QPA_PLATFORM"] = "xcb" - #qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. base_dir = get_base_directory() config_file_path = os.path.join(base_dir, "settings.json")