Skip to content

Commit 0cd294d

Browse files
author
Shintaro Katafuchi
committed
Fix to avoid null references.
1 parent 29c07a4 commit 0cd294d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/src/main/java/hotchemi/android/rate/DialogOptions.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public void setTextNegativeResId(int textNegativeResId) {
8181
}
8282

8383
public View getView() {
84+
if (view == null) {
85+
return null;
86+
}
8487
return view.get();
8588
}
8689

@@ -89,6 +92,9 @@ public void setView(View view) {
8992
}
9093

9194
public OnClickButtonListener getListener() {
95+
if (listener == null) {
96+
return null;
97+
}
9298
return listener.get();
9399
}
94100

0 commit comments

Comments
 (0)