gamnit: fix clearing reference to context in sprites too
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 4 Apr 2017 21:52:48 +0000 (17:52 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 5 Apr 2017 02:08:23 +0000 (22:08 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/flat.nit

index d5cb28e..c58658c 100644 (file)
@@ -673,6 +673,10 @@ private class SpriteSet
 
        redef fun clear
        do
+               for sprite in self do
+                       sprite.context = null
+                       sprite.sprite_set = null
+               end
                super
                for c in contexts_items do c.destroy
                contexts_map.clear