check dict for command
This commit is contained in:
parent
bc7d3b9cfb
commit
e36a232a3e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue