From: David ‘Bombe’ Roden Date: Tue, 3 May 2011 17:43:05 +0000 (+0200) Subject: Initialize options of Sone before aborting loading an empty Sone. X-Git-Tag: 0.6.4^2~30 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=63a1491b93ba8c2541ff92aab80e27cd41eda2fb;p=Sone.git Initialize options of Sone before aborting loading an empty Sone. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 55e3b65..53b6700 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1173,6 +1173,9 @@ public class Core implements IdentityListener, UpdateListener { return; } + /* initialize options. */ + sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption(false)); + /* load Sone. */ String sonePrefix = "Sone/" + sone.getId(); Long soneTime = configuration.getLongValue(sonePrefix + "/Time").getValue(null); @@ -1273,7 +1276,6 @@ public class Core implements IdentityListener, UpdateListener { } /* load options. */ - sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption(false)); sone.getOptions().getBooleanOption("AutoFollow").set(configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").getValue(null)); /* if we’re still here, Sone was loaded successfully. */