Skip to content

Commit 057ad36

Browse files
committed
Added resilience to the UIManager's DrawUI()
1 parent 646710e commit 057ad36

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Brio/UI/UIManager.cs

+11-7
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,17 @@ private void ApplySettings()
197197

198198
private void DrawUI()
199199
{
200-
BrioStyle.PushStyle();
201-
202-
_windowSystem.Draw();
203-
FileDialogManager.Draw();
204-
_libraryWindow.DrawModal();
205-
206-
BrioStyle.PopStyle();
200+
try
201+
{
202+
BrioStyle.PushStyle();
203+
_windowSystem.Draw();
204+
FileDialogManager.Draw();
205+
_libraryWindow.DrawModal();
206+
}
207+
finally
208+
{
209+
BrioStyle.PopStyle();
210+
}
207211
}
208212

209213
public void Dispose()

0 commit comments

Comments
 (0)