mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Return early if contributionsClient == null
This commit is contained in:
parent
c80d106636
commit
b42340b03a
1 changed files with 5 additions and 2 deletions
|
|
@ -92,10 +92,13 @@ public class ModificationsSyncAdapter extends AbstractThreadedSyncAdapter {
|
|||
while (!allModifications.isAfterLast()) {
|
||||
ModifierSequence sequence = modifierSequenceDao.fromCursor(allModifications);
|
||||
Contribution contrib;
|
||||
|
||||
Cursor contributionCursor;
|
||||
|
||||
if (contributionsClient == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
//TODO: How do we prevent this NPE?
|
||||
contributionCursor = contributionsClient.query(sequence.getMediaUri(), null, null, null, null);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue