소스 검색

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

Grégoire André 4 년 전
부모
커밋
c4b50b509d
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  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 };
 			}
-
-			// 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;
 	}
 
-}
+}