From 21eb3ce44a36b057279ba811011e387bdbf6ac69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20M=C3=BCller?= Date: Thu, 22 Jan 2015 18:57:56 +1300 Subject: Fix: Audaspace threw an exception for files it could not open. --- intern/audaspace/intern/AUD_SequencerHandle.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'intern') 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(m_handle); + try + { + m_handle = m_device.play(m_entry->m_sound, true); + m_3dhandle = boost::dynamic_pointer_cast(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--; -- cgit v1.2.3