mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Make a blank settings interface if one does not exist because segfaulting is bad
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user