From 2579937e7f4ae2ef01bfb45bbd49550348de8ff3 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Tue, 11 Jun 2019 22:06:03 +0200 Subject: [PATCH] Fix crash when starting with empty controller name --- src/diskreader.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diskreader.cxx b/src/diskreader.cxx index f781f09..ca51861 100644 --- a/src/diskreader.cxx +++ b/src/diskreader.cxx @@ -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;