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