From 37c459250fc90e212cecd4d952f7e25176618570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Sun, 27 Oct 2024 21:27:16 +0100 Subject: [PATCH] Fix a crash on the updater --- src/UniGetUI/MainWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/UniGetUI/MainWindow.xaml.cs b/src/UniGetUI/MainWindow.xaml.cs index 65c2ea7a9..0620655a7 100644 --- a/src/UniGetUI/MainWindow.xaml.cs +++ b/src/UniGetUI/MainWindow.xaml.cs @@ -57,7 +57,14 @@ public MainWindow() InitializeComponent(); ExtendsContentIntoTitleBar = true; - SetTitleBar(ContentRoot); + try + { + SetTitleBar(ContentRoot); + } catch + { + Logger.Warn("Could not set the title bar to the content root"); + MainApp.Instance.DisposeAndQuit(-1); + } SizeChanged += (_, _) => { SaveGeometry(); }; AppWindow.SetIcon(Path.Join(CoreData.UniGetUIExecutableDirectory, "Assets", "Images", "icon.ico"));