mirror of
https://github.com/nextcloud/android.git
synced 2024-12-22 08:44:34 +03:00
avoid NPE
This commit is contained in:
parent
366ec0b472
commit
e9bf119fa4
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue