From a0c77f8d11cf553b7737fc3e10186d013e50f633 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 24 Nov 2022 05:31:00 -0300 Subject: [PATCH] Fix NRE on Avalonia for error applets with unknown error message (#3888) --- Ryujinx.Ava/Ui/Applet/AvaHostUiHandler.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Ryujinx.Ava/Ui/Applet/AvaHostUiHandler.cs b/Ryujinx.Ava/Ui/Applet/AvaHostUiHandler.cs index 05e92c367c..a8d6a6dffa 100644 --- a/Ryujinx.Ava/Ui/Applet/AvaHostUiHandler.cs +++ b/Ryujinx.Ava/Ui/Applet/AvaHostUiHandler.cs @@ -57,14 +57,14 @@ namespace Ryujinx.Ava.Ui.Applet bool opened = false; - UserResult response = await ContentDialogHelper.ShowDeferredContentDialog(_parent, - title, - message, - "", - LocaleManager.Instance["DialogOpenSettingsWindowLabel"], - "", - LocaleManager.Instance["SettingsButtonClose"], - (int)Symbol.Important, + UserResult response = await ContentDialogHelper.ShowDeferredContentDialog(_parent, + title, + message, + "", + LocaleManager.Instance["DialogOpenSettingsWindowLabel"], + "", + LocaleManager.Instance["SettingsButtonClose"], + (int)Symbol.Important, deferEvent, async (window) => { @@ -168,7 +168,7 @@ namespace Ryujinx.Ava.Ui.Applet object response = await msgDialog.Run(); - if (response != null && buttons.Length > 1 && (int)response != buttons.Length - 1) + if (response != null && buttons != null && buttons.Length > 1 && (int)response != buttons.Length - 1) { showDetails = true; }