diff --git a/Celeste.Mod.mm/Mod/UI/CriticalErrorHandler.cs b/Celeste.Mod.mm/Mod/UI/CriticalErrorHandler.cs index 7b1d5f8ae..a578598d7 100644 --- a/Celeste.Mod.mm/Mod/UI/CriticalErrorHandler.cs +++ b/Celeste.Mod.mm/Mod/UI/CriticalErrorHandler.cs @@ -555,11 +555,13 @@ private void BeforeRender() { Celeste.Instance.GraphicsDevice.Clear(Color.Transparent); Draw.SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone, null, Matrix.CreateTranslation(16, 32, 0)); - playerHair.AfterUpdate(); - playerHair.Render(); - playerSprite.Render(); - - Draw.SpriteBatch.End(); + try { + playerHair.AfterUpdate(); + playerHair.Render(); + playerSprite.Render(); + } finally { + Draw.SpriteBatch.End(); + } } catch (Exception ex) { Logger.Log(LogLevel.Error, "crit-error-handler", "Error while rendering player sprite:"); Logger.LogDetailed(ex, "crit-error-handler");