Quickfix to avoid crashes after staleData merge
This commit is contained in:
parent
73b6235188
commit
f861546e12
1 changed files with 2 additions and 0 deletions
|
@ -201,6 +201,7 @@ public class NSSettingsStatus {
|
|||
|
||||
private String getStringOrNull(String key) {
|
||||
String ret = null;
|
||||
if(data == null) return null;
|
||||
if (data.has(key)) {
|
||||
try {
|
||||
ret = data.getString(key);
|
||||
|
@ -309,6 +310,7 @@ public class NSSettingsStatus {
|
|||
public JSONObject extentendedPumpSettings() {
|
||||
try {
|
||||
JSONObject extended = getExtendedSettings();
|
||||
if(extended == null) return null;
|
||||
if (extended.has("pump")) {
|
||||
JSONObject pump = extended.getJSONObject("pump");
|
||||
return pump;
|
||||
|
|
Loading…
Reference in a new issue