Crash fix

This commit is contained in:
Grishka 2024-03-05 05:04:50 +03:00
parent b4904024c6
commit 7e91c311d4
1 changed files with 2 additions and 2 deletions

View File

@ -961,9 +961,9 @@ public class UiUtils{
ImageCache cache=ImageCache.getInstance(context);
try{
File ava=cache.getFile(new UrlImageLoaderRequest(account.avatarStatic));
if(!ava.exists())
if(ava==null || !ava.exists())
ava=cache.getFile(new UrlImageLoaderRequest(account.avatar));
if(ava.exists()){
if(ava!=null && ava.exists()){
intent.setClipData(ClipData.newRawUri(null, getFileProviderUri(context, ava)));
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
}