mirror of
https://github.com/nvllsvm/Audinaut
synced 2024-12-21 21:15:27 +01:00
#25 Add null check to fix crash whilst offline
This commit is contained in:
parent
bf9e9ad1e6
commit
e2280304e4
@ -298,6 +298,8 @@ public final class Util {
|
||||
private static String getRestUrl(Context context, String method, SharedPreferences prefs, int instance, boolean allowAltAddress, @Nullable Map<String, String> parameters) {
|
||||
String serverUrl = prefs.getString(Constants.PREFERENCES_KEY_SERVER_URL + instance, null);
|
||||
|
||||
if (serverUrl == null) return "OFFLINE";
|
||||
|
||||
HttpUrl.Builder builder;
|
||||
builder = HttpUrl.parse(serverUrl).newBuilder();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user