misc: chore: Fix possible System.NullReferenceExceptions

This commit is contained in:
KeatonTheBot
2025-04-12 12:27:15 -05:00
parent 19013d360a
commit 3c644a712d
8 changed files with 26 additions and 27 deletions
@@ -2251,7 +2251,7 @@ namespace Ryujinx.Ava.UI.ViewModels
switch (operationOutcome)
{
case XCIFileTrimmer.OperationOutcome.Successful:
if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
if (desktop.MainWindow is MainWindow mainWindow)
mainWindow.LoadApplications();