diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-05-04 23:50:54 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-05-04 23:50:54 +0200 |
commit | 5b75d52d444d6cda368e85f5884163e229451ece (patch) | |
tree | f37f790e0bc298fac5a5f9c458001562a43919db /src/main/java | |
parent | 37d8cd61b349680eb6220013171b33589b995457 (diff) |
fix crash in RichPreview
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/RichPreview.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/RichPreview.java b/src/main/java/de/pixart/messenger/utils/RichPreview.java index 10e10b033..5087081ec 100644 --- a/src/main/java/de/pixart/messenger/utils/RichPreview.java +++ b/src/main/java/de/pixart/messenger/utils/RichPreview.java @@ -61,7 +61,7 @@ public class RichPreview { FileInputStream fis = null; ObjectInputStream is = null; final File file = new File(context.getCacheDir(), RICH_LINK_METADATA + "/" + filename); - if(file.exists()) { + if (file.exists()) { Calendar time = Calendar.getInstance(); time.add(Calendar.DAY_OF_YEAR, -7); Date lastModified = new Date(file.lastModified()); @@ -234,7 +234,7 @@ public class RichPreview { metaData.setImageurl(resolveURL(url, image)); } } - if (metaData.getImageurl().isEmpty()) { + if (metaData.getImageurl() != null && metaData.getImageurl().isEmpty()) { String src = doc.select("link[rel=image_src]").attr("href"); if (!src.isEmpty()) { metaData.setImageurl(resolveURL(url, src)); |