diff --git a/RefreshLayout/src/main/java/org/song/refreshlayout/QSBaseRefreshLayout.java b/RefreshLayout/src/main/java/org/song/refreshlayout/QSBaseRefreshLayout.java index d65ccac..2368625 100644 --- a/RefreshLayout/src/main/java/org/song/refreshlayout/QSBaseRefreshLayout.java +++ b/RefreshLayout/src/main/java/org/song/refreshlayout/QSBaseRefreshLayout.java @@ -272,6 +272,8 @@ public boolean onTouchEvent(MotionEvent ev) { private void setDragViewOffsetAndPro(int offset, boolean requiresUpdate) { if (offset == currentOffset) return; + if (draggedRefreshView == null) return; + int max = draggedRefreshView.maxDistance(); if (Math.abs(offset) > max && max > 0) offset = offset > 0 ? max : -max;