Fix for 33536, r=serge

This commit is contained in:
av%netscape.com 2000-03-29 23:58:42 +00:00
parent 64a312c5a1
commit 8f89e6a0ae
2 changed files with 30 additions and 14 deletions

View File

@ -153,17 +153,25 @@ nsPluginTag::nsPluginTag(nsPluginInfo* aPluginInfo)
mExtensions = new_str(aPluginInfo->fExtensions);
mVariants = aPluginInfo->fVariantCount;
mMimeTypeArray = new char*[mVariants];
mMimeDescriptionArray = new char*[mVariants];
mExtensionsArray = new char*[mVariants];
if(mMimeTypeArray && mMimeDescriptionArray && mExtensionsArray)
mMimeTypeArray = new char*[mVariants];
if(aPluginInfo->fMimeTypeArray != nsnull)
{
for (int i = 0; i < mVariants; i++) {
for (int i = 0; i < mVariants; i++)
mMimeTypeArray[i] = new_str(aPluginInfo->fMimeTypeArray[i]);
}
mMimeDescriptionArray = new char*[mVariants];
if(aPluginInfo->fMimeDescriptionArray != nsnull)
{
for (int i = 0; i < mVariants; i++)
mMimeDescriptionArray[i] = new_str(aPluginInfo->fMimeDescriptionArray[i]);
}
mExtensionsArray = new char*[mVariants];
if(aPluginInfo->fExtensionArray != nsnull)
{
for (int i = 0; i < mVariants; i++)
mExtensionsArray[i] = new_str(aPluginInfo->fExtensionArray[i]);
}
}
mFileName = new_str(aPluginInfo->fFileName);

View File

@ -153,17 +153,25 @@ nsPluginTag::nsPluginTag(nsPluginInfo* aPluginInfo)
mExtensions = new_str(aPluginInfo->fExtensions);
mVariants = aPluginInfo->fVariantCount;
mMimeTypeArray = new char*[mVariants];
mMimeDescriptionArray = new char*[mVariants];
mExtensionsArray = new char*[mVariants];
if(mMimeTypeArray && mMimeDescriptionArray && mExtensionsArray)
mMimeTypeArray = new char*[mVariants];
if(aPluginInfo->fMimeTypeArray != nsnull)
{
for (int i = 0; i < mVariants; i++) {
for (int i = 0; i < mVariants; i++)
mMimeTypeArray[i] = new_str(aPluginInfo->fMimeTypeArray[i]);
}
mMimeDescriptionArray = new char*[mVariants];
if(aPluginInfo->fMimeDescriptionArray != nsnull)
{
for (int i = 0; i < mVariants; i++)
mMimeDescriptionArray[i] = new_str(aPluginInfo->fMimeDescriptionArray[i]);
}
mExtensionsArray = new char*[mVariants];
if(aPluginInfo->fExtensionArray != nsnull)
{
for (int i = 0; i < mVariants; i++)
mExtensionsArray[i] = new_str(aPluginInfo->fExtensionArray[i]);
}
}
mFileName = new_str(aPluginInfo->fFileName);