Fix a bug in WASAPI where an empty message could be logged.

This commit is contained in:
David Reid
2020-03-01 11:31:51 +10:00
parent 79cca305d9
commit b8b228a9da
+5 -1
View File
@@ -11927,7 +11927,11 @@ done:
pData->pAudioClient = NULL; pData->pAudioClient = NULL;
} }
return ma_context_post_error(pContext, NULL, MA_LOG_LEVEL_ERROR, errorMsg, result); if (errorMsg != NULL && errorMsg[0] != '\0') {
ma_context_post_error(pContext, NULL, MA_LOG_LEVEL_ERROR, errorMsg, result);
}
return result;
} else { } else {
return MA_SUCCESS; return MA_SUCCESS;
} }