Skip to content

Commit

Permalink
Merge pull request #20 from BlackOverlord666/master
Browse files Browse the repository at this point in the history
fix multiple changing of AnimatedSource property to same value
  • Loading branch information
thomaslevesque committed Jan 15, 2016
2 parents 0d5cc4a + 8e37d97 commit e88a765
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WpfAnimatedGif/ImageBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ private static void AnimatedSourceChanged(DependencyObject o, DependencyProperty

var oldValue = e.OldValue as ImageSource;
var newValue = e.NewValue as ImageSource;
if (ReferenceEquals(oldValue, newValue))
return;
if (oldValue != null)
{
imageControl.Loaded -= ImageControlLoaded;
Expand Down

0 comments on commit e88a765

Please sign in to comment.