[app] don't crash when loading feature graphic

for apps without icon feature graphic and app icon

Fixes acra-crash-reports#687
This commit is contained in:
Torsten Grote
2023-09-19 10:10:35 +02:00
committed by Torsten Grote
parent 230b061e6a
commit 2bf56e7c56

View File

@@ -360,7 +360,7 @@ public class App implements Comparable<App>, Parcelable {
public static RequestBuilder<Drawable> loadWithGlide(Context context, long repoId, IndexFile file) {
Repository repo = FDroidApp.getRepoManager(context).getRepository(repoId);
if (repo == null) { // This is also used for apps that do not have a repo
if (repo == null || file == null) { // This is also used for apps that do not have a repo
return Glide.with(context).load(R.drawable.ic_repo_app_default);
}
String address = Utils.getRepoAddress(repo);