From 718c2dcda6163a835ca7a35a40fd3135d0e7cf97 Mon Sep 17 00:00:00 2001 From: Ethan Moffat Date: Fri, 27 May 2022 15:15:17 -0700 Subject: [PATCH] Prevent crash when someone is emoting while logging in --- .../Rendering/Character/CharacterAnimationActions.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs index 68f3206a9..3dfe9a378 100644 --- a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs +++ b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs @@ -254,7 +254,14 @@ public void NotifyMapEffect(MapEffect effect, byte strength = 0) public void NotifyEmote(short playerId, Emote emote) { - Animator.Emote(playerId, emote); + try + { + Animator.Emote(playerId, emote); + } + catch (InvalidOperationException) + { + // if still transitioning to in-game state, the game will crash because the in-game control set is not completely set up yet + } } public void MakeMainPlayerDrunk()