Resource Manager: Fix a bug when reusing an already-loaded data buffer.

This commit is contained in:
David Reid
2020-08-25 18:05:08 +10:00
parent d83b3886a1
commit 07ae0be2ad
2 changed files with 18 additions and 1 deletions
+6
View File
@@ -2197,6 +2197,12 @@ static ma_result ma_resource_manager_data_buffer_init_nolock(ma_resource_manager
return result; /* Should never happen. Failed to increment the reference count. */
}
result = ma_resource_manager_data_buffer_init_connector(pDataBuffer);
if (result != MA_SUCCESS) {
ma_resource_manager_data_buffer_node_free(pDataBuffer->pResourceManager, pDataBuffer->pNode);
return result;
}
if (pNotification != NULL) {
ma_async_notification_signal(pNotification);
}