Skip to content

Commit

Permalink
Fix a bug may cause infinite loop. (#3073)
Browse files Browse the repository at this point in the history
* Fix a bug may cause infinite loop.

* Update BarLineChartViewBase.swift

put nil check first seems better
  • Loading branch information
JyHu authored and liuxuan30 committed Dec 9, 2017
1 parent 2ff5cb5 commit 6fee51c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
gestureRecognizer == _panGestureRecognizer
{
var scrollView = self.superview
while !(scrollView is NSUIScrollView)
while scrollView != nil && !(scrollView is NSUIScrollView)
{
scrollView = scrollView?.superview
}
Expand Down

0 comments on commit 6fee51c

Please sign in to comment.