Make a blank settings interface if one does not exist because segfaulting is bad

This commit is contained in:
Paul Hollinsky
2018-10-22 17:23:13 -04:00
parent 6456d4e261
commit 8044488bed
5 changed files with 16 additions and 25 deletions
-18
View File
@@ -216,9 +216,6 @@ bool icsneo_settingsRefresh(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->refresh();
}
@@ -226,9 +223,6 @@ bool icsneo_settingsApply(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->apply();
}
@@ -236,9 +230,6 @@ bool icsneo_settingsApplyTemporary(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->apply(true);
}
@@ -246,9 +237,6 @@ bool icsneo_settingsApplyDefaults(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->applyDefaults();
}
@@ -256,9 +244,6 @@ bool icsneo_settingsApplyDefaultsTemporary(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->applyDefaults(true);
}
@@ -266,9 +251,6 @@ bool icsneo_setBaudrate(const neodevice_t* device, uint16_t netid, uint32_t newB
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->setBaudrateFor(netid, newBaudrate);
}