mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-25 01:08:14 -04:00
[app] Fix crash when loading icons for apps without repo
Happens in panic settings for apps that should get uninstalled.
This commit is contained in:
committed by
Hans-Christoph Steiner
parent
88d5ad2480
commit
9a0761b7f5
@@ -739,6 +739,9 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
||||
|
||||
public RequestBuilder<Drawable> loadWithGlide(Context context) {
|
||||
Repo repo = RepoProvider.Helper.findById(context, repoId);
|
||||
if (repo == null) { // This is also used for apps that do not have a repo
|
||||
return Glide.with(context).load((Drawable) null);
|
||||
}
|
||||
if (repo.address.startsWith("content://")) {
|
||||
return Glide.with(context).load(getIconUrl(context, repo));
|
||||
} else if (repo.address.startsWith("file://")) {
|
||||
|
||||
Reference in New Issue
Block a user