Browse Source

prevent illegalArgumentException on generating preview

tobiasKaminsky 7 years ago
parent
commit
941a5bd508

+ 6 - 1
src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java

@@ -405,7 +405,12 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
     public void updateFileDetails(boolean transferring, boolean refresh) {
         if (readyToShow()) {
             FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
-            if (refresh && storageManager != null) {
+            
+            if (storageManager == null) {
+                return;
+            }
+            
+            if (refresh) {
                 setFile(storageManager.getFileByPath(getFile().getRemotePath()));
             }
             OCFile file = getFile();