fixed a NullPointerException in the config system

This commit is contained in:
FalsePattern committed 2024-11-14 19:10:37 +01:00
1 parent cd50b56a85
commit 70b5f65f25
1 file changed
+5 -1
@@ -53,7 +53,11 @@ public class DoubleListConfigField extends AListConfigField<double[]> {
property.setDefaultValues(defaultValue);
property.setMinValue(min);
property.setMaxValue(max);
if (!property.isDoubleList()) {
try {
if (!property.isDoubleList()) {
setToDefault();
}
} catch (NullPointerException ignored) {
setToDefault();
}
property.comment += "\n[range: " + min + " ~ " + max + ", default: " + Arrays.toString(defaultValue) + "]";