Skip to content

Commit

Permalink
Merge pull request #172 from yuyakaido/issue/170
Browse files Browse the repository at this point in the history
Fix crash when touching view with no data
  • Loading branch information
yuyakaido authored Dec 21, 2018
2 parents f1e6416 + 8dfd062 commit f3cade7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ protected void onDetachedFromWindow() {
public boolean onInterceptTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
CardStackLayoutManager manager = (CardStackLayoutManager) getLayoutManager();
manager.updateProportion(event.getX(), event.getY());
if (manager != null) {
manager.updateProportion(event.getX(), event.getY());
}
}
return super.onInterceptTouchEvent(event);
}
Expand Down

0 comments on commit f3cade7

Please sign in to comment.