fix for 17449

added checkings for NULL


git-svn-id: svn://10.0.0.236/trunk@52397 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
1999-11-01 19:39:26 +00:00
parent 13b7afe705
commit b338802f73

View File

@@ -1,4 +1,4 @@
/*
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
@@ -67,6 +67,10 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInstancePeerIm
JNIEXPORT jobject JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInstancePeerImpl_newStream
(JNIEnv *env, jobject jthis, jstring _type, jstring _target) {
nsMIMEType mimeType = NULL;
if ( _type == NULL
|| _target == NULL) {
return NULL; //nb should throw NullPointerException
}
if(!(mimeType = (nsMIMEType)env->GetStringUTFChars(_type,NULL))) {
return NULL;
}