diff --git a/Fo76ini/Forms/FormMain/Views/UserControlHome.cs b/Fo76ini/Forms/FormMain/Views/UserControlHome.cs index 0a6446d..2492a0c 100644 --- a/Fo76ini/Forms/FormMain/Views/UserControlHome.cs +++ b/Fo76ini/Forms/FormMain/Views/UserControlHome.cs @@ -369,18 +369,25 @@ private String GetLocalizedServerStatus(String language, String statusKey) if (request.Success && request.StatusCode == HttpStatusCode.OK) { - JObject responseJSON = request.GetJObject(); - JObject statusKeys = (JObject)responseJSON["statusKey"]; + try + { + JObject responseJSON = request.GetJObject(); + JObject statusKeys = (JObject)responseJSON["statusKey"]; - // If translation does not exist, the server returns an empty JSON object {} - // In this situation, fallback to English: - if (statusKeys == null) - return GetLocalizedServerStatus("en", statusKey); + // If translation does not exist, the server returns an empty JSON object {} + // In this situation, fallback to English: + if (statusKeys == null) + return GetLocalizedServerStatus("en", statusKey); - if (statusKeys[statusKey] != null) - return statusKeys[statusKey].ToObject(); + if (statusKeys[statusKey] != null) + return statusKeys[statusKey].ToObject(); - return statusKey; + return statusKey; + } + catch (Exception) // Newtonsoft.Json.JsonReaderException + { + return statusKey; + } } return statusKey;