Merge pull request #5536 from ByteHamster/fix-sync-crash

Fix crash when sync provider is null
This commit is contained in:
ByteHamster 2021-11-07 14:57:59 +01:00 committed by GitHub
commit 3856597211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -346,7 +346,10 @@ public class SyncService extends Worker {
private ISyncService getActiveSyncProvider() {
String selectedSyncProviderKey = SynchronizationSettings.getSelectedSyncProviderKey();
SynchronizationProviderViewData selectedService = SynchronizationProviderViewData
.valueOf(selectedSyncProviderKey);
.fromIdentifier(selectedSyncProviderKey);
if (selectedService == null) {
return null;
}
switch (selectedService) {
case GPODDER_NET:
return new GpodnetService(AntennapodHttpClient.getHttpClient(),