Skip to content

Commit

Permalink
fix: ImageSourceUrlMsAppDataScheme NullReferencenceException on DataC…
Browse files Browse the repository at this point in the history
…ontext Changed
  • Loading branch information
workgroupengineering committed Apr 21, 2022
1 parent b40b6c0 commit e17e5b8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public ImageSourceUrlMsAppDataScheme()

private async void ImageSourceUrlMsAppDataScheme_DataContextChanged(DependencyObject sender, DataContextChangedEventArgs args)
{
await((ImageSourceUrlMsAppDataSchemeViewModel)DataContext).LoadAsync();
if (DataContext is ImageSourceUrlMsAppDataSchemeViewModel viewModel)
{
await viewModel.LoadAsync();
}
}
}

Expand Down

0 comments on commit e17e5b8

Please sign in to comment.