diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-03 01:56:08 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-03 01:56:08 +0400 |
commit | d372fc178c6488e71d14a7fc56e9fd9ee27812e3 (patch) | |
tree | 4a05f7e364e2e51a29090bf9f21b1a4034bf49db | |
parent | d8d3cc69ef80cef398381ad9af6931a07f8e3a47 (diff) |
Fix [#23578] Blender crashes when Audio Scrubbing is on
Reported by Guy Smith.
MSVC-compiled code would fall over iterator decrease on empty list. Shortest snippet to redo: http://www.pasteall.org/15408/cpp
See also http://www.pasteall.org/15409/cpp for list.end() behaviour on MSVC. Thanks to Jörg Müller for assistance.
-rw-r--r-- | intern/audaspace/OpenAL/AUD_OpenALDevice.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp index aa7cfcfd880..a87a4ad5eef 100644 --- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp +++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp @@ -243,7 +243,10 @@ void AUD_OpenALDevice::updateStreams() stop(sound); // decrement again, so that we get the next sound in the // next loop run - --it; + if(m_playingSounds->empty()) + break; + else + --it; } // continue playing else |