mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 584143 - Crashes when streams are open and a plugin instance is closed at/under nsNPAPIPluginInstance::Stop, r=bsmedberg
This commit is contained in:
parent
bd6b3373f5
commit
80c7aced07
@ -182,10 +182,11 @@ NS_IMETHODIMP nsNPAPIPluginInstance::Stop()
|
||||
OnPluginDestroy(&mNPP);
|
||||
|
||||
// clean up open streams
|
||||
for (unsigned int i = 0; i < mPStreamListeners.Length(); i++) {
|
||||
mPStreamListeners[i]->CleanUpStream(NPRES_USER_BREAK);
|
||||
while (mPStreamListeners.Length() > 0) {
|
||||
nsRefPtr<nsNPAPIPluginStreamListener> currentListener(mPStreamListeners[0]);
|
||||
currentListener->CleanUpStream(NPRES_USER_BREAK);
|
||||
mPStreamListeners.RemoveElement(currentListener);
|
||||
}
|
||||
mPStreamListeners.Clear();
|
||||
|
||||
if (!mPlugin)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user