From e6bfadbaf0c53b3e222d174ff67d2e112e5e647f Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Wed, 1 Apr 2020 14:04:55 -0400 Subject: [PATCH] Fix empty key frames for texture animations causing a possible crash --- Switch_Toolbox_Library/Animations/MaterialAnimation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Switch_Toolbox_Library/Animations/MaterialAnimation.cs b/Switch_Toolbox_Library/Animations/MaterialAnimation.cs index 42084d18..7171a5c3 100644 --- a/Switch_Toolbox_Library/Animations/MaterialAnimation.cs +++ b/Switch_Toolbox_Library/Animations/MaterialAnimation.cs @@ -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]; }