Fix for 25069

Added null pointer checking


git-svn-id: svn://10.0.0.236/trunk@58888 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2000-01-27 05:42:56 +00:00
parent b0d8cb960b
commit d4d893f329

View File

@@ -134,13 +134,15 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_pluglet_mozilla_PlugletStreamInfoImpl
*/
JNIEXPORT void JNICALL Java_org_mozilla_pluglet_mozilla_PlugletStreamInfoImpl_requestRead
(JNIEnv *env, jobject jthis, jobject object) {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletStreamInfoImpl.requestRead\n"));
nsIPluginStreamInfo * streamInfo = (nsIPluginStreamInfo*)env->GetLongField(jthis, peerFID);
if (!streamInfo) {
if (!streamInfo
|| !object ) { //nb we need to add some Exception throwing
return;
}
nsByteRange* range = ByteRanges::GetByteRanges(env,object);
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletStreamInfoImpl.requestRead\n"));
streamInfo->RequestRead(range);
ByteRanges::FreeByteRanges(range);
}