Commit acf4284a authored by David Reid's avatar David Reid

Fix a crash when passing in NULL for the engine config.

parent d0bfcf0c
...@@ -8661,7 +8661,7 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng ...@@ -8661,7 +8661,7 @@ MA_API ma_result ma_engine_init(const ma_engine_config* pConfig, ma_engine* pEng
resourceManagerConfig.decodedChannels = 0; /* Leave the decoded channel count as 0 so we can get good spatialization. */ resourceManagerConfig.decodedChannels = 0; /* Leave the decoded channel count as 0 so we can get good spatialization. */
resourceManagerConfig.decodedSampleRate = pEngine->sampleRate; resourceManagerConfig.decodedSampleRate = pEngine->sampleRate;
ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks); ma_allocation_callbacks_init_copy(&resourceManagerConfig.allocationCallbacks, &pEngine->allocationCallbacks);
resourceManagerConfig.pVFS = pConfig->pResourceManagerVFS; resourceManagerConfig.pVFS = engineConfig.pResourceManagerVFS;
result = ma_resource_manager_init(&resourceManagerConfig, pEngine->pResourceManager); result = ma_resource_manager_init(&resourceManagerConfig, pEngine->pResourceManager);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment