From c9ce9ceb037734e8d9c6e06e26609d66ef54c1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20S=CC=8Colte=CC=81s?= Date: Thu, 11 Apr 2024 11:20:24 +0200 Subject: [PATCH] Do not call Hide when the MainWindow from lifetime is not present --- WalletWasabi.Fluent/ApplicationStateManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WalletWasabi.Fluent/ApplicationStateManager.cs b/WalletWasabi.Fluent/ApplicationStateManager.cs index 12091c7cb8a..2a90252dfa4 100644 --- a/WalletWasabi.Fluent/ApplicationStateManager.cs +++ b/WalletWasabi.Fluent/ApplicationStateManager.cs @@ -168,7 +168,10 @@ private void ActivatableLifetimeOnDeactivated(object? sender, ActivatedEventArgs case ActivationKind.Background: if (this is IMainWindowService service) { - service.Hide(); + if (_lifetime.MainWindow is not null) + { + service.Hide(); + } } break; }