agent: Fix use of freed stream in nice_agent_dispose()
nice_stream_close() calls agent_find_stream(), which iterates over agent->streams list. Therefore, when we're freeing agent->streams in a loop, we must also delete the respective GSList item from the list at the end of each iteration. Otherwise agent_find_stream() would stumble over already deleted NiceStream instance the next time it gets called. Fixes random crashes when running test-different-number-streams on Windows.
Showing with 6 additions and 8 deletions