diff options
-rwxr-xr-x | LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs | 6 | ||||
-rwxr-xr-x | TVApps/TVApps/TVApps.cs | 2 | ||||
-rwxr-xr-x | TVHome/TVHome/TVHome.cs | 2 | ||||
-rwxr-xr-x | TVHome/TVHome/Views/MainPage.xaml.cs | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs b/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs index 828e007..6d9dedd 100755 --- a/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs +++ b/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs @@ -128,9 +128,9 @@ namespace LibTVRefCommonPortable.Utils }; var mediaControlAction = defaultStateDescription.Action as MediaControlAction; - mediaControlAction.ExtraData.Add("View By", "All"); - mediaControlAction.ExtraData.Add("Media type", "Video"); - mediaControlAction.ExtraData.Add("Media Id", item.MediaId); + mediaControlAction?.ExtraData.Add("View By", "All"); + mediaControlAction?.ExtraData.Add("Media type", "Video"); + mediaControlAction?.ExtraData.Add("Media Id", item.MediaId); var recentShortcutInfo = new RecentShortcutInfo(); diff --git a/TVApps/TVApps/TVApps.cs b/TVApps/TVApps/TVApps.cs index 66230a7..589e5c3 100755 --- a/TVApps/TVApps/TVApps.cs +++ b/TVApps/TVApps/TVApps.cs @@ -74,7 +74,7 @@ namespace TVApps try { string modelName; - if (DependencyService.Get<ISystemSettings>().GetSystemModelName(out modelName)) + if (DependencyService.Get<ISystemSettings>() != null && DependencyService.Get<ISystemSettings>().GetSystemModelName(out modelName)) { SizeUtils.SetModelName(modelName); } diff --git a/TVHome/TVHome/TVHome.cs b/TVHome/TVHome/TVHome.cs index 642d83e..8afe1a1 100755 --- a/TVHome/TVHome/TVHome.cs +++ b/TVHome/TVHome/TVHome.cs @@ -92,7 +92,7 @@ namespace TVHome try { string modelName; - if (DependencyService.Get<ISystemSettings>().GetSystemModelName(out modelName)) + if (DependencyService.Get<ISystemSettings>() != null && DependencyService.Get<ISystemSettings>().GetSystemModelName(out modelName)) { SizeUtils.SetModelName(modelName); } diff --git a/TVHome/TVHome/Views/MainPage.xaml.cs b/TVHome/TVHome/Views/MainPage.xaml.cs index c67c9b6..c65faae 100755 --- a/TVHome/TVHome/Views/MainPage.xaml.cs +++ b/TVHome/TVHome/Views/MainPage.xaml.cs @@ -75,7 +75,7 @@ namespace TVHome.Views PageMainPanel.TranslateTo(0.0, 0.0, 150); #pragma warning restore CS4014 await PageMainPanel.ScaleTo(0.0, 150); - DependencyService.Get<IWindowAPIs>().SetIconified(true); + DependencyService.Get<IWindowAPIs>()?.SetIconified(true); } /// <summary> @@ -90,7 +90,7 @@ namespace TVHome.Views PageMainPanel.TranslateTo(0.0, 0.0, 150); #pragma warning restore CS4014 await PageMainPanel.ScaleTo(1.0, 150); - DependencyService.Get<IWindowAPIs>().SetIconified(false); + DependencyService.Get<IWindowAPIs>()?.SetIconified(false); } /// <summary> @@ -98,7 +98,7 @@ namespace TVHome.Views /// </summary> private void ToggleIconified() { - if (DependencyService.Get<IWindowAPIs>().GetIconified() == true) + if (DependencyService.Get<IWindowAPIs>()?.GetIconified() == true) { PageMainPanel.InitialFocusing(); Uniconified(); |