mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
Fixed crash bug in sndmanager.cpp
This commit is contained in:
parent
3df4362b33
commit
b486f12a5f
2
mangle
2
mangle
@ -1 +1 @@
|
|||||||
Subproject commit 932465442bd97c3bcb3a8630414c16bdd887fa9f
|
Subproject commit 3324f6494c021e3dc69cd76ace5ff25a52e4bcce
|
@ -149,15 +149,26 @@ public:
|
|||||||
// Update all sounds
|
// Update all sounds
|
||||||
void updateAll()
|
void updateAll()
|
||||||
{
|
{
|
||||||
for(ManagedSound *s = list.getHead(); s != NULL; s=s->next)
|
ManagedSound *s = list.getHead();
|
||||||
s->update();
|
while(s)
|
||||||
|
{
|
||||||
|
ManagedSound *cur = s;
|
||||||
|
// Propagate first, since update() may delete object
|
||||||
|
s = s->next;
|
||||||
|
cur->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detach and unlock all sounds
|
// Detach and unlock all sounds
|
||||||
void detachAll()
|
void detachAll()
|
||||||
{
|
{
|
||||||
for(ManagedSound *s = list.getHead(); s != NULL; s=s->next)
|
ManagedSound *s = list.getHead();
|
||||||
s->detach();
|
while(s)
|
||||||
|
{
|
||||||
|
ManagedSound *cur = s;
|
||||||
|
s = s->next;
|
||||||
|
cur->detach();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user