[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:
Torsten Grote
2022-07-14 17:51:46 -03:00
committed by Hans-Christoph Steiner
parent 88d5ad2480
commit 9a0761b7f5

View File

@@ -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://")) {