Skip to content

Commit 62783f0

Browse files
committed
Fix: Dialog deadlock in case of error
1 parent 6d3164c commit 62783f0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/ExtensionManager.UI/DialogService.cs

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System.Runtime.Remoting.Channels;
2-
31
using ExtensionManager.Manifest;
4-
using ExtensionManager.UI.Utils;
52
using ExtensionManager.UI.ViewModels;
63
using ExtensionManager.UI.Views;
74
using ExtensionManager.UI.Worker;
@@ -114,7 +111,16 @@ static void OnUIThread(object viewModel)
114111
DataContext = viewModel
115112
};
116113

117-
window.ShowDialog();
114+
try
115+
{
116+
window.ShowDialog();
117+
}
118+
catch
119+
{
120+
window.Close();
121+
122+
throw;
123+
}
118124
}
119125
}
120126
}

0 commit comments

Comments
 (0)