Skip to content

Commit

Permalink
fix 474 crash when clicking on header sometime
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenCoder committed Nov 7, 2016
1 parent f77fd6a commit 9bcd10b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ private boolean isHeaderOrFooterPosition(int position) {
/**
* have a headview and EMPTY_VIEW FOOTER_VIEW LOADING_VIEW
*/
if (baseQuickAdapter==null){
if (recyclerView!=null){
baseQuickAdapter= (BaseQuickAdapter) recyclerView.getAdapter();
}else {
return false;
}
}
int type = baseQuickAdapter.getItemViewType(position);
return (type == EMPTY_VIEW || type == HEADER_VIEW || type == FOOTER_VIEW || type == LOADING_VIEW);
}
Expand Down

0 comments on commit 9bcd10b

Please sign in to comment.