From 10551b68041c9ed791b95840d8b159c27694932d Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sat, 4 Aug 2012 21:25:28 -0400 Subject: [PATCH] Removed static and added an error message --- MediaBrowser.ServerApplication/MainWindow.xaml.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.ServerApplication/MainWindow.xaml.cs b/MediaBrowser.ServerApplication/MainWindow.xaml.cs index 02a6d1be3..7b6932848 100644 --- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs +++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs @@ -23,15 +23,13 @@ namespace MediaBrowser.ServerApplication /// public partial class MainWindow : Window { - protected static Kernel kernel; - public MainWindow() { InitializeComponent(); LoadKernel(); } - private static void LoadKernel() + private void LoadKernel() { Progress progress = new Progress(); SplashScreen splash = new SplashScreen(progress); @@ -40,12 +38,11 @@ namespace MediaBrowser.ServerApplication { splash.Show(); - kernel = new Kernel(); - - kernel.Init(progress); + new Kernel().Init(progress); } - catch + catch (Exception ex) { + MessageBox.Show("There was an error launching Media Browser: " + ex.Message); } finally {