diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-11-07 14:57:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 14:57:59 +0100 |
commit | 3856597211876bca53d4afa8779cb89e9096d336 (patch) | |
tree | b23ca1be8697fb9ab1fe60cb91a3d8074c945ea3 /core | |
parent | 58293350c71b95483a36d4ec106f78f81a0ab3a4 (diff) | |
parent | 4af3be7aa44e2fa8b872a155af5882d4ab5a63b0 (diff) | |
download | AntennaPod-3856597211876bca53d4afa8779cb89e9096d336.zip |
Merge pull request #5536 from ByteHamster/fix-sync-crash
Fix crash when sync provider is null
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java index b2a474598..82896382d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/sync/SyncService.java @@ -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(), |