Temporary fix for null pointer

Only if the server provider doesn’t have the information about the crc32
This commit is contained in:
JKetelaar
2014-07-24 01:22:38 +02:00
parent 5b6b79a074
commit 9529e86945
@@ -12,6 +12,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
/**
* Gets the information for the selected server provider
@@ -77,7 +78,11 @@ public class ServerProviderInfo {
}
public long getCRC32() {
return Long.parseLong(properties.get("crc32"));
if (properties.get("crc32") != null) {
return Long.parseLong(properties.get("crc32"));
}else{
return (long) new Random().nextInt(2000) + 1;
}
}
public long getClientCRC32() {