Skip to content

NullPointerException #11

Description

@wzj1

private void updateConfig() {
if (glass == null) {
rebuild();
return;
}

   //This will cause a null object referencel
    glass.post(() -> glass.updateParameters());

}

//When invisible
protected void onDetachedFromWindow() {
removeGlass();
super.onDetachedFromWindow();
}

//glass will be set to null
private void removeGlass() {
if (glass != null) {
removeView(glass);
glass = null;
}
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions