Skip to content

Commit

Permalink
Resolve warning
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Nov 15, 2024
1 parent c851403 commit 9beab3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ShockOsc/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ public static Microsoft.Maui.Hosting.MauiApp CreateMauiApp()
if (Application.Current == null) return;
var result = await Application.Current.MainPage!.DisplayAlert(
var page = Application.Current.Windows[0].Page;
if(page == null) return;
var result = await page.DisplayAlert(
"Close?",
"Do you want to close ShockOSC?",
"Yes",
"Cancel");
if (result) Application.Current?.Quit();
if (result) Application.Current.Quit();
};
});
});
Expand Down

0 comments on commit 9beab3c

Please sign in to comment.