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
+2 -2
View File
@@ -145,10 +145,10 @@ bool Device::open() {
return false;
}
bool settingsNecessary = bool(settings); // Check if the shared_ptr exists
bool settingsNecessary = !settings->disabled;
if(settingsNecessary) {
settings->refresh();
if(!settings || !settings->ok())
if(!settings->ok())
return false;
}