fix zero frames texture animation fatal error
This commit is contained in:
parent
ac7e7a4c2f
commit
e9222976ef
@ -25,6 +25,9 @@ void TextureAnimator::update(float delta) {
|
|||||||
std::unordered_set<uint> changedTextures;
|
std::unordered_set<uint> changedTextures;
|
||||||
|
|
||||||
for (auto& elem : animations) {
|
for (auto& elem : animations) {
|
||||||
|
if (elem.frames.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
elem.timer += delta;
|
elem.timer += delta;
|
||||||
size_t frameNum = elem.currentFrame;
|
size_t frameNum = elem.currentFrame;
|
||||||
Frame frame = elem.frames[elem.currentFrame];
|
Frame frame = elem.frames[elem.currentFrame];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user