check dict for command

This commit is contained in:
Frank DeMarco 2016-02-15 19:32:18 -05:00
parent bc7d3b9cfb
commit e36a232a3e
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class Delegate(GameChild):
return self.get_command_attribute(evt) in commands
def get_command_attribute(self, evt):
return evt.dict[self.command_key]
return evt.dict.has_key(self.command_key) and evt.dict[self.command_key]
def post(self, command=None, cancel=False, **attributes):
attributes[self.command_key] = command