Fixes NPE in Util function

This commit is contained in:
maskara 2017-11-14 00:44:02 +05:30
parent c0ff9ed09c
commit 8dd8e09f2a
4 changed files with 13 additions and 2 deletions

View file

@ -120,8 +120,9 @@ public class Media implements Parcelable {
return localUri;
}
@Nullable
public String getImageUrl() {
if (imageUrl == null) {
if (imageUrl == null && this.getFilename() != null) {
imageUrl = Utils.makeThumbBaseUrl(this.getFilename());
}
return imageUrl;