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
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-03 01:56:08 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-03 01:56:08 +0400
commitd372fc178c6488e71d14a7fc56e9fd9ee27812e3 (patch)
tree4a05f7e364e2e51a29090bf9f21b1a4034bf49db /intern/audaspace/OpenAL
parentd8d3cc69ef80cef398381ad9af6931a07f8e3a47 (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.
Diffstat (limited to 'intern/audaspace/OpenAL')
-rw-r--r--intern/audaspace/OpenAL/AUD_OpenALDevice.cpp5
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