فهرست منبع

use correct size for png

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 سال پیش
والد
کامیت
0c944e95db
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

+ 2 - 2
src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

@@ -304,8 +304,8 @@ public class ThumbnailsCacheManager {
                                 }
 
                                 // Handle PNG
-                                if (file.getMimetype().equalsIgnoreCase(PNG_MIMETYPE)) {
-                                    thumbnail = handlePNG(thumbnail, pxW, pxH);
+                                if (thumbnail != null && file.getMimetype().equalsIgnoreCase(PNG_MIMETYPE)) {
+                                    thumbnail = handlePNG(thumbnail, thumbnail.getWidth(), thumbnail.getHeight());
                                 }
 
                                 // Add thumbnail to cache