mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156472 - Part 14 - Null check the window, because it can be different during the window's shutdown. r=baku
In which case everything is cleaned up properly by the HTMLMediaElement themselves.
This commit is contained in:
parent
a057ca77e0
commit
1bbf6e6702
@ -562,6 +562,15 @@ AudioChannelService::RefreshAgentsCapture(nsPIDOMWindow* aWindow,
|
||||
|
||||
AudioChannelWindow* winData = GetWindowData(pTopWindow->WindowID());
|
||||
|
||||
// This can happen, but only during shutdown, because the the outer window
|
||||
// changes ScriptableTop, so that its ID is different.
|
||||
// In this case either we are capturing, and it's too late because the window
|
||||
// has been closed anyways, or we are un-capturing, and everything has already
|
||||
// been cleaned up by the HTMLMediaElements or the AudioContexts.
|
||||
if (!winData) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsTObserverArray<AudioChannelAgent*>::ForwardIterator
|
||||
iter(winData->mAgents);
|
||||
while (iter.HasMore()) {
|
||||
|
Loading…
Reference in New Issue
Block a user