layout_editor: fix crash when we don't have layouts

main
Ilya Zhuravlev 2020-12-21 02:03:14 -05:00
parent d186fcf7b6
commit e8f197e2e8
1 changed files with 2 additions and 0 deletions

View File

@ -127,6 +127,8 @@ class LayoutEditor(BasicEditor):
return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts return isinstance(self.device, VialKeyboard) and "labels" in self.device.keyboard.layouts
def pack(self): def pack(self):
if not self.choices:
return 0
val = "" val = ""
for choice in self.choices: for choice in self.choices:
val += choice.pack() val += choice.pack()