avoid NPE

This commit is contained in:
tobiasKaminsky 2015-12-02 20:23:07 +01:00
parent 366ec0b472
commit e9bf119fa4

View file

@ -182,7 +182,7 @@ public class ThumbnailsCacheManager {
if (mFile instanceof OCFile) {
thumbnail = doOCFileInBackground();
if (((OCFile) mFile).isVideo()){
if (((OCFile) mFile).isVideo() && thumbnail != null){
thumbnail = addVideoOverlay(thumbnail);
}
} else if (mFile instanceof File) {
@ -191,7 +191,7 @@ public class ThumbnailsCacheManager {
String url = ((File) mFile).getAbsolutePath();
String mMimeType = FileStorageUtils.getMimeTypeFromName(url);
if (mMimeType != null && mMimeType.startsWith("video/")){
if (mMimeType != null && mMimeType.startsWith("video/") && thumbnail != null){
thumbnail = addVideoOverlay(thumbnail);
}
//} else { do nothing