[core/input] Skip partial events

Clicking on a separator creates partial events ("instance" missing).
Ignore those events, as they crash the input processor.

fixes #31
This commit is contained in:
Tobi-wan Kenobi 2016-12-11 13:43:34 +01:00
parent 90adbfbec9
commit 75f5af4866
2 changed files with 16 additions and 1 deletions

View file

@ -27,6 +27,8 @@ def read_input(inp):
inp.has_event = True
try:
event = json.loads(line)
if not "instance" in event:
continue
inp.callback(event)
inp.redraw()
except ValueError: