Skip to content

Commit c9a7f19

Browse files
committed
release: Detect if DLL is loadable or not.
1 parent 9b3d091 commit c9a7f19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Flarial.Launcher/Pages/HomePage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ async void OnButtonClick(object sender, RoutedEventArgs args)
177177
}
178178

179179
_button.Content = "Launching...";
180-
if (!await Task.Run(() => FlarialClient.Current.Launch(initialized)) ?? false)
181-
await MainDialog.LaunchFailure.ShowAsync();
182-
else
183-
await MainDialog.ClientInjectionFailure.ShowAsync();
180+
var value = await Task.Run(() => FlarialClient.Current.Launch(initialized));
181+
182+
if (value is null) await MainDialog.ClientInjectionFailure.ShowAsync();
183+
else if (!(bool)value) await MainDialog.LaunchFailure.ShowAsync();
184184
}
185185
finally
186186
{

0 commit comments

Comments
 (0)