diff options
author | Jörg Müller <nexyon@gmail.com> | 2015-01-22 08:57:56 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2015-01-22 09:06:23 +0300 |
commit | 21eb3ce44a36b057279ba811011e387bdbf6ac69 (patch) | |
tree | 98343cbd325e28a6383d03045a15aa61d6b55c8e /intern/audaspace | |
parent | 5c6ef95b716b97f4d2bc7902049ecf4451e255fd (diff) |
Fix: Audaspace threw an exception for files it could not open.
Diffstat (limited to 'intern/audaspace')
-rw-r--r-- | intern/audaspace/intern/AUD_SequencerHandle.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/intern/audaspace/intern/AUD_SequencerHandle.cpp b/intern/audaspace/intern/AUD_SequencerHandle.cpp index 56cfa0de683..aa742f7b8db 100644 --- a/intern/audaspace/intern/AUD_SequencerHandle.cpp +++ b/intern/audaspace/intern/AUD_SequencerHandle.cpp @@ -47,8 +47,15 @@ void AUD_SequencerHandle::start() // let's try playing if(m_entry->m_sound.get()) { - m_handle = m_device.play(m_entry->m_sound, true); - m_3dhandle = boost::dynamic_pointer_cast<AUD_I3DHandle>(m_handle); + try + { + m_handle = m_device.play(m_entry->m_sound, true); + m_3dhandle = boost::dynamic_pointer_cast<AUD_I3DHandle>(m_handle); + } + catch(AUD_Exception&) + { + // handle stays invalid in case we get an exception + } // after starting we have to set the properties, so let's ensure that m_status--; |