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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user