From e8f197e2e8904c4f0aa6caf6d443c4de69731cce Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Mon, 21 Dec 2020 02:03:14 -0500 Subject: [PATCH] layout_editor: fix crash when we don't have layouts --- src/main/python/layout_editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/python/layout_editor.py b/src/main/python/layout_editor.py index 0b2d185..7851c66 100644 --- a/src/main/python/layout_editor.py +++ b/src/main/python/layout_editor.py @@ -127,6 +127,8 @@ class LayoutEditor(BasicEditor): return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts def pack(self): + if not self.choices: + return 0 val = "" for choice in self.choices: val += choice.pack()