File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -809,15 +809,15 @@ void AnimatedVisualPlayer::OnAnimationOptimizationPropertyChanged(
809
809
void AnimatedVisualPlayer::CreateAnimations () {
810
810
m_createAnimationsCounter++;
811
811
812
- if (m_isAnimationsCreated)
812
+ if (m_isAnimationsCreated || m_animatedVisual == nullptr || ! SharedHelpers::IsRS5OrHigher () )
813
813
{
814
814
return ;
815
815
}
816
816
817
817
// Check if current animated visual supports creating animations and create them.
818
818
if (const auto & animatedVisual = m_animatedVisual.get ())
819
819
{
820
- if (const auto & animatedVisual2 = m_animatedVisual .try_as <winrt::IAnimatedVisual2>())
820
+ if (const auto & animatedVisual2 = animatedVisual .try_as <winrt::IAnimatedVisual2>())
821
821
{
822
822
animatedVisual2.CreateAnimations ();
823
823
m_isAnimationsCreated = true ;
@@ -845,7 +845,7 @@ void AnimatedVisualPlayer::DestroyAnimations() {
845
845
// Check if current animated visual supports destroyig animations.
846
846
if (const auto & animatedVisual = m_animatedVisual.get ())
847
847
{
848
- if (const auto & animatedVisual2 = m_animatedVisual .try_as <winrt::IAnimatedVisual2>())
848
+ if (const auto & animatedVisual2 = animatedVisual .try_as <winrt::IAnimatedVisual2>())
849
849
{
850
850
animatedVisual2.DestroyAnimations ();
851
851
m_isAnimationsCreated = false ;
You can’t perform that action at this time.
0 commit comments