From d4548ee476a35fef1a1f0462019895544ca4a2b1 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sun, 30 Jul 2017 12:45:10 +0200 Subject: [PATCH] Window: do not crash when no devices are plugged in Fixes #65. --- piper/window.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/piper/window.py b/piper/window.py index 386d66e..ad26914 100644 --- a/piper/window.py +++ b/piper/window.py @@ -52,6 +52,9 @@ class Window(Gtk.ApplicationWindow): self._ratbag = ratbag self._device = self._fetch_ratbag_device() + if self._device is None: + self._present_error_dialog("No devices found") + return try: capabilities = self._device.capabilities