Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorJörg Müller <nexyon@gmail.com>2019-03-11 01:28:51 +0300
committerJörg Müller <nexyon@gmail.com>2019-03-11 01:28:51 +0300
commit6fd11a21f5c589aab856ca5992fea768820229ec (patch)
tree81d6863fb2b5164012c4c824ae425495726c636a /extern
parent1cc8f9d463a7cffbe5a466a4d83a8070a5b8d959 (diff)
Fix T62255: Blender defaults to "OpenAL Soft" in sound settings, regardless of saved preferences
- Default device (index 0) was hard coded. - Also fixing crash with invalid device passed to blender via -setaudio.
Diffstat (limited to 'extern')
-rw-r--r--extern/audaspace/src/devices/DeviceManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/extern/audaspace/src/devices/DeviceManager.cpp b/extern/audaspace/src/devices/DeviceManager.cpp
index 2ebc3d58c86..304f8b49f70 100644
--- a/extern/audaspace/src/devices/DeviceManager.cpp
+++ b/extern/audaspace/src/devices/DeviceManager.cpp
@@ -35,7 +35,12 @@ void DeviceManager::registerDevice(std::string name, std::shared_ptr<IDeviceFact
std::shared_ptr<IDeviceFactory> DeviceManager::getDeviceFactory(std::string name)
{
- return m_factories[name];
+ auto it = m_factories.find(name);
+
+ if(it == m_factories.end())
+ return nullptr;
+
+ return it->second;
}
std::shared_ptr<IDeviceFactory> DeviceManager::getDefaultDeviceFactory()