@@ -76,7 +76,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
76
76
false );
77
77
ButterKnife .bind (this , layoutView );
78
78
79
- String question , explanation , yesButtonText , noButtonText ;
79
+ String question , explanation = null , yesButtonText , noButtonText ;
80
80
switch (position ) {
81
81
case SPAM :
82
82
question = getString (R .string .review_spam );
@@ -115,12 +115,17 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
115
115
116
116
//Get existing user name if it is already saved using savedInstanceState else get from reviewController
117
117
if (savedInstanceState == null ) {
118
- user = getReviewActivity ().reviewController .firstRevision .getUser ();
118
+ if (getReviewActivity ().reviewController != null ) {
119
+ user = getReviewActivity ().reviewController .firstRevision .getUser ();
120
+ }
119
121
} else {
120
122
user = savedInstanceState .getString (SAVED_USER );
121
123
}
122
124
123
- explanation = getString (R .string .review_thanks_explanation , user );
125
+ //if the user is null because of whatsoever reason, review will not be sent anyways
126
+ if (!TextUtils .isEmpty (user )) {
127
+ explanation = getString (R .string .review_thanks_explanation , user );
128
+ }
124
129
125
130
yesButtonText = getString (R .string .review_thanks_yes_button_text );
126
131
noButtonText = getString (R .string .review_thanks_no_button_text );
0 commit comments