Browse Source

Fix npe in sharees lookup

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 5 years ago
parent
commit
44698f6c90

+ 1 - 1
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -999,7 +999,7 @@ public class FileDataStorageManager {
 
             String sharees = c.getString(c.getColumnIndex(ProviderTableMeta.FILE_SHAREES));
 
-            if ("null".equals(sharees) || sharees.isEmpty()) {
+            if (sharees == null || "null".equals(sharees) || sharees.isEmpty()) {
                 file.setSharees(new ArrayList<>());
             } else {
                 try {