gamnit: don't abort when failing to load a texture
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 25 Jun 2016 18:38:03 +0000 (14:38 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 25 Jun 2016 23:19:22 +0000 (19:19 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/flat.nit

index b74da82..45d1ce9 100644 (file)
@@ -166,12 +166,11 @@ redef class App
                # Prepare to draw
                for tex in all_root_textures do
                        tex.load
+                       gamnit_error = tex.error
+                       if gamnit_error != null then print_error gamnit_error
 
                        glTexParameteri(gl_TEXTURE_2D, gl_TEXTURE_MIN_FILTER, gl_LINEAR)
                        glTexParameteri(gl_TEXTURE_2D, gl_TEXTURE_MAG_FILTER, gl_LINEAR)
-
-                       gamnit_error = tex.error
-                       assert gamnit_error == null else print_error gamnit_error
                end
        end