Addressing #48856, added argument null-check before passing it to nsCStringKey::nsCStringKey()

patch by warren, r=av


git-svn-id: svn://10.0.0.236/trunk@76654 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
av%netscape.com 2000-08-18 21:53:03 +00:00
parent fc8b07d0a1
commit adf2c05ade
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ void DisplayNoDefaultPluginDialog(const char *mimeType)
if (nsnull == mimeTypesSeen) {
mimeTypesSeen = new nsHashtable(NS_MIME_TYPES_HASH_NUM);
}
if (nsnull != mimeTypesSeen){
if ((mimeTypesSeen != nsnull) && (mimeType != nsnull)) {
nsCStringKey key(mimeType);
// if we've seen this mimetype before
if (mimeTypesSeen->Get(&key)) {

View File

@ -171,7 +171,7 @@ void DisplayNoDefaultPluginDialog(const char *mimeType)
if (nsnull == mimeTypesSeen) {
mimeTypesSeen = new nsHashtable(NS_MIME_TYPES_HASH_NUM);
}
if (nsnull != mimeTypesSeen){
if ((mimeTypesSeen != nsnull) && (mimeType != nsnull)) {
nsCStringKey key(mimeType);
// if we've seen this mimetype before
if (mimeTypesSeen->Get(&key)) {