mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Fix npe
This commit is contained in:
parent
cc51ea3cd4
commit
84259ef5de
1 changed files with 2 additions and 5 deletions
|
|
@ -50,11 +50,7 @@ public class SendThankTask extends AsyncTask<Void, Integer, Boolean> {
|
||||||
public SendThankTask(Context context, Media media){
|
public SendThankTask(Context context, Media media){
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.media = media;
|
this.media = media;
|
||||||
try {
|
|
||||||
this.revision = mwApi.firstRevisionOfFile(media.getFilename());
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -83,6 +79,7 @@ public class SendThankTask extends AsyncTask<Void, Integer, Boolean> {
|
||||||
mwApi.setAuthCookie(authCookie);
|
mwApi.setAuthCookie(authCookie);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
this.revision = mwApi.firstRevisionOfFile(media.getFilename());
|
||||||
editToken = mwApi.getEditToken();
|
editToken = mwApi.getEditToken();
|
||||||
if (editToken.equals("+\\")) {
|
if (editToken.equals("+\\")) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue