mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 700583 - Null-check our way out of crashes on both mobile and desktop in pr_FindSymbolInLib caused by plugin code where the plugin fails to load correctly, r=josh
This commit is contained in:
parent
ac923ca26d
commit
25de92431b
@ -307,6 +307,10 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary **outLibrary)
|
||||
printf("LoadPlugin() %s returned %lx\n",
|
||||
libSpec.value.pathname, (unsigned long)pLibrary);
|
||||
#endif
|
||||
|
||||
if (!pLibrary) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -182,8 +182,9 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
|
||||
if (!mLibrary)
|
||||
#endif
|
||||
{
|
||||
DebugOnly<nsresult> rv = pluginFile.LoadPlugin(&mLibrary);
|
||||
NS_ASSERTION(NS_OK == rv, "trouble with mPluginFile");
|
||||
nsresult rv = pluginFile.LoadPlugin(&mLibrary);
|
||||
if (NS_FAILED(rv))
|
||||
return false;
|
||||
}
|
||||
NS_ASSERTION(mLibrary, "couldn't open shared object");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user