Explorar o código

Fix crash on atlas loading with anim starting at 1 (#949)

Grégoire André %!s(int64=4) %!d(string=hai) anos
pai
achega
c4b50b509d
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      hxd/res/Atlas.hx

+ 5 - 5
hxd/res/Atlas.hx

@@ -128,12 +128,12 @@ class Atlas extends Resource {
 				}
 				}
 				tl[index] = { t : t, width : origW, height : origH };
 				tl[index] = { t : t, width : origW, height : origH };
 			}
 			}
-
-			// remove first element if index started at 1 instead of 0
-			for( tl in contents )
-				if( tl.length > 1 && tl[0] == null ) tl.shift();
 		}
 		}
+
+		// remove first element if index started at 1 instead of 0
+		for( tl in contents )
+			if( tl.length > 1 && tl[0] == null ) tl.shift();
 		return contents;
 		return contents;
 	}
 	}
 
 
-}
+}