--- liblscp/trunk/src/device.c 2006/12/15 21:46:48 974 +++ liblscp/trunk/src/device.c 2006/12/17 00:59:40 975 @@ -275,6 +275,9 @@ { int iAudioDrivers = -1; + if (pClient == NULL) + return -1; + // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -301,6 +304,9 @@ { const char *pszSeps = ","; + if (pClient == NULL) + return NULL; + // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -389,9 +395,9 @@ int iAudioDevice = -1; if (pClient == NULL) - return iAudioDevice; + return -1; if (pszAudioDriver == NULL) - return iAudioDevice; + return -1; // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -445,6 +451,9 @@ { int iAudioDevices = -1; + if (pClient == NULL) + return -1; + // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -644,6 +653,9 @@ { int iMidiDrivers = -1; + if (pClient == NULL) + return -1; + // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -670,6 +682,9 @@ { const char *pszSeps = ","; + if (pClient == NULL) + return NULL; + // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -760,9 +775,9 @@ int iMidiDevice = -1; if (pClient == NULL) - return iMidiDevice; + return -1; if (pszMidiDriver == NULL) - return iMidiDevice; + return -1; // Lock this section up. lscp_mutex_lock(pClient->mutex); @@ -816,6 +831,9 @@ { int iMidiDevices = -1; + if (pClient == NULL) + return -1; + // Lock this section up. lscp_mutex_lock(pClient->mutex);