Skip to content

Commit

Permalink
fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadi Shaheen committed May 14, 2020
1 parent 23ae68c commit e1f40e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jfoenix/src/main/java/com/jfoenix/controls/JFXSnackbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ private void processSnackbar() {
}

private void refreshPopup() {
if (snackbarContainer == null) {
return;
}
Bounds contentBound = this.getLayoutBounds();
double offsetX = Math.ceil(snackbarContainer.getWidth() / 2) - Math.ceil(contentBound.getWidth() / 2);
double offsetY = snackbarContainer.getHeight() - contentBound.getHeight();
Expand Down

0 comments on commit e1f40e9

Please sign in to comment.