Fix corner case crash
authorNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:13:23 +0000 (14:13 +0200)
committerNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:13:23 +0000 (14:13 +0200)
erdslangetjie/__main__.py

index 71ef53b405cc46e9c6f5a8780109e6eaeac8abda..ebccae8129749946e9952c5eb2b6a7914f87223f 100644 (file)
@@ -203,7 +203,8 @@ class GameWindow(RelativeLayout):
     def reset_level(self):
         Clock.unschedule(self.timed_move)
         self.timer_set = False
-        self.remove_widget(self.nemesis_tile)
+        if self.nemesis_tile:
+            self.remove_widget(self.nemesis_tile)
         self.nemesis.reset_pos()
         if self.level_obj:
             self.level_obj.load_tiles()