diff --git a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java index 397ecd38..21bea3bf 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/util/ConfigXml.java @@ -459,8 +459,10 @@ public class ConfigXml { */ folder.minDiskFree = new Folder.MinDiskFree(); Element elementMinDiskFree = (Element) r.getElementsByTagName("minDiskFree").item(0); - folder.minDiskFree.unit = getAttributeOrDefault(elementMinDiskFree, "unit", "%"); - folder.minDiskFree.value = getContentOrDefault(elementMinDiskFree, 1f); + if (elementMinDiskFree != null) { + folder.minDiskFree.unit = getAttributeOrDefault(elementMinDiskFree, "unit", "%"); + folder.minDiskFree.value = getContentOrDefault(elementMinDiskFree, 1f); + } // Log.v(TAG, "folder.minDiskFree.unit=" + folder.minDiskFree.unit + ", folder.minDiskFree.value=" + folder.minDiskFree.value); // Versioning