Skip to content

Commit b69e48d

Browse files
committed
Fix prefs load message about invalid values
1 parent 2da490f commit b69e48d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/java/io/xpipe/app/prefs/AppPrefsStorageHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ public <T> T loadObject(String id, JavaType type, T defaultObject, boolean log)
108108
return defaultObject;
109109
}
110110

111+
if (tree.isNull()) {
112+
return null;
113+
}
114+
111115
if (PrefsChoiceValue.class.isAssignableFrom(type.getRawClass())) {
112116
List<T> all = (List<T>) getAll(type.getRawClass());
113117
if (all != null) {

0 commit comments

Comments
 (0)