Skip to content

Commit

Permalink
null check to mainFrame_Navigated
Browse files Browse the repository at this point in the history
- added a null check
  • Loading branch information
dnenov committed Nov 27, 2023
1 parent 9dde030 commit 42bf04c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ private void mainFrame_Navigated(object sender, System.Windows.Navigation.Naviga
{
Page navigatedPage = e.Content as Page;

if (navigatedPage == null || PublishPages == null || !PublishPages.Any()) return;

PublishPages.Values.ToList().ForEach(page => { page.IsEnabled = false; });

Dispatcher.BeginInvoke((Action)(() =>
Expand Down

0 comments on commit 42bf04c

Please sign in to comment.