mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-12-06 19:01:44 +00:00
NPE fix for getRandoms
This commit is contained in:
1 parent
ff788b4309
commit
c60f808d12
1 file changed
+5
-1
@@ -154,7 +154,11 @@ public class ServerProviderInfo {
|
||||
|
||||
public URL getRandoms() {
|
||||
try {
|
||||
return new URL(properties.getProperty("randoms_jar"));
|
||||
String randomsUrl = properties.getProperty("randoms_jar");
|
||||
if (randomsUrl == null || randomsUrl.length() == 0) {
|
||||
randomsUrl = Configuration.GET_RANDOMS + (Configuration.BOT_VERSION.isNightly() ? Configuration.NIGHTLY_APPEND : "");
|
||||
}
|
||||
return new URL(randomsUrl);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user