Skip to content

Commit 9b47b1f

Browse files
authored
npe fixed in MaterialToast.isOpen()
If a toast was previously closed and afterwards you check if it is open a null pointer exception is thrown.
1 parent 8a429df commit 9b47b1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gwt-material/src/main/java/gwt/material/design/client/ui/MaterialToast.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ public boolean isOpen() {
200200
String id = getId();
201201
if (id != null && !id.isEmpty()) {
202202
Widget toast = RootPanel.get(id);
203+
if(toast == null){
204+
return false;
205+
}
203206
return toast.isAttached() && toast.isVisible();
204207
}
205208
return false;

0 commit comments

Comments
 (0)