Fix crash when starting with empty controller name

main
Georg Krause 2019-06-11 22:06:03 +02:00
parent b8a5786ed8
commit 2579937e7f
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ int DiskReader::loadPreferences()
int nCtlrs = cJSON_GetArraySize( ctlrs );
for(int i = 0; i < nCtlrs; i++ ) {
cJSON* ctlr = cJSON_GetArrayItem( ctlrs, i );
if( ctlr ) {
if( ctlr && strcmp(ctlr->valuestring, "") != 0 ) {
LOOPP_NOTE("Loading controller %s", ctlr->valuestring);
stringstream s;
s << getenv("HOME") << "/.config/soundship/loopp/controllers/" << ctlr->valuestring;