From a37e2d6e44c7f384f26062dea5599749c7c60623 Mon Sep 17 00:00:00 2001 From: sharmander Date: Tue, 6 Feb 2024 09:05:32 -0800 Subject: [PATCH] Resolve an issue where changes to the main window's positioning could cause the application to crash if a modal was dismissed beforehand. (#6223) --- src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs b/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs index 0863cbaa43..b9d919f95b 100644 --- a/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs +++ b/src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs @@ -336,6 +336,11 @@ namespace Ryujinx.Ava.UI.Helpers void OverlayOnPositionChanged(object sender, PixelPointEventArgs e) { + if (_contentDialogOverlayWindow is null) + { + return; + } + _contentDialogOverlayWindow.Position = parent.PointToScreen(new Point()); }