Prevents the call into the plugin if the plugin hasn't been already

initilized. bug=58823 r=av
This commit is contained in:
peterlubczynski%netscape.com 2000-12-11 23:00:45 +00:00
Родитель 6cc1692ca8
Коммит 4845d58f58
2 изменённых файлов: 18 добавлений и 6 удалений

Просмотреть файл

@ -321,14 +321,20 @@ ns4xPluginStreamListener::OnStopBinding(nsIPluginStreamInfo* pluginInfo,
// pinkerton
// relies on routine descriptors, not present in carbon.
// We need to fix this.
PRLibrary* lib = nsnull;
if(mInst)
lib = mInst->fLibrary;
PRLibrary* lib = nsnull;
PRBool started = PR_FALSE;
if(mInst) {
lib = mInst->fLibrary;
started = mInst->IsStarted();
}
if (started)
{
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_DestroyStreamProc(callbacks->destroystream,
npp,
&mNPStream,
NPRES_DONE), lib);
}
if(error != NPERR_NO_ERROR)
return NS_ERROR_FAILURE;
#endif

Просмотреть файл

@ -321,14 +321,20 @@ ns4xPluginStreamListener::OnStopBinding(nsIPluginStreamInfo* pluginInfo,
// pinkerton
// relies on routine descriptors, not present in carbon.
// We need to fix this.
PRLibrary* lib = nsnull;
if(mInst)
lib = mInst->fLibrary;
PRLibrary* lib = nsnull;
PRBool started = PR_FALSE;
if(mInst) {
lib = mInst->fLibrary;
started = mInst->IsStarted();
}
if (started)
{
NS_TRY_SAFE_CALL_RETURN(error, CallNPP_DestroyStreamProc(callbacks->destroystream,
npp,
&mNPStream,
NPRES_DONE), lib);
}
if(error != NPERR_NO_ERROR)
return NS_ERROR_FAILURE;
#endif