Make copy of list before iterating over it.
parent
a82f9cb265
commit
cbdf8d0622
|
@ -68,7 +68,8 @@ StreamControl::CloseAllReadStreams()
|
||||||
{
|
{
|
||||||
AssertOwningThread();
|
AssertOwningThread();
|
||||||
|
|
||||||
ReadStreamList::ForwardIterator iter(mReadStreamList);
|
auto readStreamList = mReadStreamList;
|
||||||
|
ReadStreamList::ForwardIterator iter(readStreamList);
|
||||||
while (iter.HasMore()) {
|
while (iter.HasMore()) {
|
||||||
iter.GetNext()->CloseStream();
|
iter.GetNext()->CloseStream();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue