io.Button: Fixed will_end/will_migrate
@@ -34,10 +34,14 @@ class Button(Actor):
self.button = calvinsys.open(self, "calvinsys.io.button", text=self.text)
def will_migrate(self):
+ if self.button:
calvinsys.close(self.button)
+ self.button = None
def will_end(self):
+ if self.button:
calvinsys.close(self.button)
+ self.button = None
def did_migrate(self):
self.setup()
