Fixed npe in ReplyFragment callback from ReplyManager.

The user could potentially navigate away, and than the activity is null.
captchafix
Florens Douwes 11 years ago
parent d033644348
commit 14a1593ef6
  1. 2
      Chan/src/org/floens/chan/ui/fragment/ReplyFragment.java

@ -410,6 +410,8 @@ public class ReplyFragment extends DialogFragment {
* @param response
*/
private void handleSubmitResponse(ReplyResponse response) {
if (getActivity() == null) return;
if (response.isNetworkError || response.isUserError) {
int resId = response.isCaptchaError ? R.string.reply_error_captcha : (response.isFileError ? R.string.reply_error_file : R.string.reply_error);
Toast.makeText(getActivity(), resId, Toast.LENGTH_LONG).show();

Loading…
Cancel
Save