Window: do not crash when no devices are plugged in

Fixes #65.
This commit is contained in:
Jente Hidskes
2017-07-30 12:45:10 +02:00
committed by Peter Hutterer
parent 7a3ad955dc
commit d4548ee476

View File

@@ -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