mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Make loading custom XAML safer
This commit is contained in:
@@ -117,10 +117,17 @@ namespace RedBookPlayer.GUI
|
||||
DataContext = new PlayerViewModel();
|
||||
|
||||
// Load the theme
|
||||
if (xaml != null)
|
||||
new AvaloniaXamlLoader().Load(xaml, null, this);
|
||||
else
|
||||
try
|
||||
{
|
||||
if(xaml != null)
|
||||
new AvaloniaXamlLoader().Load(xaml, null, this);
|
||||
else
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
InitializeDigits();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user