From 2cbe63f1628fdd721eed9132525c7492e9503aaf Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 29 Sep 2018 11:55:42 +0200 Subject: [PATCH] Fixed potential exception in start if user enter invalid value inside the combined arms slots entry. --- ui/eventmenu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/eventmenu.py b/ui/eventmenu.py index 82ad891e..80eacf91 100644 --- a/ui/eventmenu.py +++ b/ui/eventmenu.py @@ -154,7 +154,10 @@ class EventMenu(Menu): self.event.is_awacs_enabled = False ca_slot_entry_value = self.ca_slot_entry.get() - ca_slots = int(ca_slot_entry_value and ca_slot_entry_value or "0") + try: + ca_slots = int(ca_slot_entry_value and ca_slot_entry_value or "0") + except: + ca_slots = 0 self.event.ca_slots = ca_slots flights = {k: {} for k in self.event.tasks} # type: db.TaskForceDict