misc: chore: Fix possible System.NullReferenceExceptions

This commit is contained in:
KeatonTheBot committed 2025-04-12 12:27:15 -05:00
1 parent 19013d360a
commit 3c644a712d
8 files changed
+26 -27

No files matched your search

@@ -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();