Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Fixed a crash when the content presenter was set to null during a pag…
Browse files Browse the repository at this point in the history
…e transition.

Work Item: 11586
  • Loading branch information
shawnoster_cp authored and shawnoster_cp committed Apr 15, 2014
1 parent 08db373 commit a697df3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Microsoft.Phone.Controls.Toolkit/Transitions/TransitionFrame.cs
Expand Up @@ -230,9 +230,15 @@ private void EnsureLastTransitionIsComplete()

// If the app calls GoBack on NavigatedTo, we want the old content to be null
// because you can't have the same content in two spots on the visual tree.
_oldContentPresenter.Content = null;
if (_oldContentPresenter != null)
{
_oldContentPresenter.Content = null;
}

_storedOldTransition.Stop();
if (_storedOldTransition != null)
{
_storedOldTransition.Stop();
}

_storedNavigationOutTransition = null;
_storedOldTransition = null;
Expand Down

0 comments on commit a697df3

Please sign in to comment.