Skip to content

Commit

Permalink
Merge pull request #1668 from GeekTR/master
Browse files Browse the repository at this point in the history
修复快速点击崩溃的bug
  • Loading branch information
CymChad authored Oct 24, 2017
2 parents 03665c1 + 37bbc6e commit dde7464
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.support.annotation.IntRange;
import android.support.annotation.LayoutRes;
import android.util.Log;
import android.util.SparseIntArray;
import android.view.ViewGroup;

Expand Down Expand Up @@ -65,7 +66,9 @@ protected void addItemType(int type, @LayoutRes int layoutResId) {

@Override
public void remove(@IntRange(from = 0L) int position) {
if (mData == null || position >= mData.size()) return;
if (mData == null
|| position < 0
|| position >= mData.size()) return;

T entity = mData.get(position);
if (entity instanceof IExpandable) {
Expand Down

0 comments on commit dde7464

Please sign in to comment.