summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2022-06-22 07:21:17 +0200
committerGitHub <noreply@github.com>2022-06-22 07:21:17 +0200
commita5d744f4103b85cec8475713d9321f37dd0bbbbf (patch)
tree2b0ad4b65a77266adf0259d0428ce43312db6964
parenta5ff913e2444db9b81218fb548efd84677f7161f (diff)
parent72cd0154806e23b5a55059c73d6431ca11def1b6 (diff)
downloadAntennaPod-a5d744f4103b85cec8475713d9321f37dd0bbbbf.zip
Merge pull request #5946 from ByteHamster/fix-crashes
Fix 2 NPEs reported on Google Play
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/FeedInfoFragment.java3
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedInfoFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedInfoFragment.java
index 7902a4988..bca0f8640 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedInfoFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedInfoFragment.java
@@ -185,6 +185,9 @@ public class FeedInfoFragment extends Fragment implements Toolbar.OnMenuItemClic
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
+ if (header == null || infoContainer == null) {
+ return;
+ }
int horizontalSpacing = (int) getResources().getDimension(R.dimen.additional_horizontal_spacing);
header.setPadding(horizontalSpacing, header.getPaddingTop(), horizontalSpacing, header.getPaddingBottom());
infoContainer.setPadding(horizontalSpacing, infoContainer.getPaddingTop(),
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
index 96ac08c6d..e24922ab0 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadServiceNotification.java
@@ -132,7 +132,7 @@ public class DownloadServiceNotification {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < statuses.size(); i++) {
- if (statuses.get(i).isSuccessful()) {
+ if (statuses.get(i) == null || statuses.get(i).isSuccessful()) {
continue;
}
sb.append("• ").append(statuses.get(i).getTitle());