Merge pull request #5946 from ByteHamster/fix-crashes
Fix 2 NPEs reported on Google Play
This commit is contained in:
commit
a5d744f410
|
@ -185,6 +185,9 @@ public class FeedInfoFragment extends Fragment implements Toolbar.OnMenuItemClic
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
if (header == null || infoContainer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
int horizontalSpacing = (int) getResources().getDimension(R.dimen.additional_horizontal_spacing);
|
int horizontalSpacing = (int) getResources().getDimension(R.dimen.additional_horizontal_spacing);
|
||||||
header.setPadding(horizontalSpacing, header.getPaddingTop(), horizontalSpacing, header.getPaddingBottom());
|
header.setPadding(horizontalSpacing, header.getPaddingTop(), horizontalSpacing, header.getPaddingBottom());
|
||||||
infoContainer.setPadding(horizontalSpacing, infoContainer.getPaddingTop(),
|
infoContainer.setPadding(horizontalSpacing, infoContainer.getPaddingTop(),
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class DownloadServiceNotification {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
for (int i = 0; i < statuses.size(); i++) {
|
for (int i = 0; i < statuses.size(); i++) {
|
||||||
if (statuses.get(i).isSuccessful()) {
|
if (statuses.get(i) == null || statuses.get(i).isSuccessful()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sb.append("• ").append(statuses.get(i).getTitle());
|
sb.append("• ").append(statuses.get(i).getTitle());
|
||||||
|
|
Loading…
Reference in New Issue