Fix empty key frames for texture animations causing a possible crash

This commit is contained in:
KillzXGaming 2020-04-01 14:04:55 -04:00
parent 66f429a555
commit e6bfadbaf0

View file

@ -76,6 +76,7 @@ namespace Toolbox.Library.Animations
public virtual string GetActiveTextureNameByFrame(float frame)
{
var keyFrame = GetKeyFrame(frame);
if (keyFrame == null) return "";
return MaterialAnimation.Textures[(int)keyFrame.Value];
}