ConfigManager: Fix NPE when resetting configs with null default
This commit is contained in:
@@ -659,6 +659,7 @@ public class ConfigManager
|
||||
return str;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
static String objectToString(Object object)
|
||||
{
|
||||
if (object instanceof Color)
|
||||
@@ -702,7 +703,7 @@ public class ConfigManager
|
||||
{
|
||||
return Long.toString(((Duration) object).toMillis());
|
||||
}
|
||||
return object.toString();
|
||||
return object == null ? null : object.toString();
|
||||
}
|
||||
|
||||
@Subscribe(priority = 100)
|
||||
|
||||
Reference in New Issue
Block a user