Skip to content

Add null pointer check#2

Open
sim051277 wants to merge 1 commit intodidikk:masterfrom
sim051277:null-pointer-exception
Open

Add null pointer check#2
sim051277 wants to merge 1 commit intodidikk:masterfrom
sim051277:null-pointer-exception

Conversation

@sim051277
Copy link

Adding and using this library in my project caused a null pointer exception crash for the following line . Hence adding the null pointer check as safe guard
private int getTopForViewRelativeOnlyChild(View v) {
int top = v.getTop();
while (v.getParent() != getChildAt(0)) {
v = (View) v.getParent();
top += v.getTop(); //Null pointer exception here ,
}
return top;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant