Fixed keyerror

This commit is contained in:
Ander
2014-11-14 12:31:32 +01:00
parent e15e217323
commit e6d60fb4dc

View File

@@ -26,8 +26,10 @@ class ScreenObjectsManager():
self.text_objects = {}
def set_object(self, key, add_object):
if self.text_objects[key] is not None:
try:
self.dirty_area.append(self.text_objects[key].rect_in_pos)
except KeyError:
pass
self.text_objects[key] = add_object
self.dirty_area.append(add_object.rect_in_pos)