Skip to content

Commit

Permalink
Merge pull request #73 from TomKaltz/master
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Sep 25, 2013
2 parents 08a7169 + ec945e2 commit d051d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GongSolutions.Wpf.DragDrop/Utilities/VisualTreeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static DependencyObject GetVisualAncestor(this DependencyObject d, Type t
{
var item = VisualTreeHelper.GetParent(d.FindVisualTreeRoot());

while (item != null) {
while (item != null && type != null) {
if (item.GetType() == type || item.GetType().IsSubclassOf(type)) {
return item;
}
Expand Down Expand Up @@ -104,4 +104,4 @@ public static IEnumerable<T> GetVisualDescendents<T>(this DependencyObject d) wh
yield break;
}
}
}
}

0 comments on commit d051d74

Please sign in to comment.