Add null check to line that causes crash

This commit is contained in:
misaochan 2018-01-22 16:48:33 +10:00
parent 6ea7367bf3
commit 2d677d9dad

View file

@ -105,8 +105,8 @@ public class ModificationsSyncAdapter extends AbstractThreadedSyncAdapter {
}
contrib = contributionDao.fromCursor(contributionCursor);
if (contrib.getState() == Contribution.STATE_COMPLETED) {
if (contrib != null && contrib.getState() == Contribution.STATE_COMPLETED) {
String pageContent;
try {
pageContent = mwApi.revisionsByFilename(contrib.getFilename());